From 987a4ebd52d267091ed839ab23793352d0aef715 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=81=8D=E5=85=AE=E6=83=9A=E5=85=AE?= <1173718158@qq.com> Date: Tue, 3 Dec 2024 19:51:33 +0800 Subject: [PATCH] . --- cpp/LunaHook/LunaHook/engine64/vita3k.cpp | 27 +---------------------- 1 file changed, 1 insertion(+), 26 deletions(-) diff --git a/cpp/LunaHook/LunaHook/engine64/vita3k.cpp b/cpp/LunaHook/LunaHook/engine64/vita3k.cpp index c8300722..726a6f72 100644 --- a/cpp/LunaHook/LunaHook/engine64/vita3k.cpp +++ b/cpp/LunaHook/LunaHook/engine64/vita3k.cpp @@ -5,7 +5,6 @@ namespace auto idxDescriptor = isVirtual == true ? 2 : 1; auto idxEntrypoint = idxDescriptor + 1; std::string Vita3KGameID; - std::atomic unindexablehooks_near = 0; uintptr_t getDoJitAddress() { // Vita3K\external\dynarmic\src\dynarmic\backend\x64\emit_x64.h @@ -38,7 +37,6 @@ namespace const char *_id; }; std::unordered_map emfunctionhooks; - std::unordered_map> unindexablehooks; } namespace @@ -79,28 +77,7 @@ namespace return; Vita3KGameID = wcasta(curr); last = curr; - HostInfo(HOSTINFO::EmuGameName, WideStringToString(game).c_str()); - for (auto &&[id, ptr] : unindexablehooks) - { - if (id == Vita3KGameID) - { - HookParam hp; - static int __fake = 0x10; - hp.address = __fake++; - hp.type = DIRECT_READ; - hp.user_value = (uintptr_t)&ptr; - hp.text_fun = [](hook_stack *stack, HookParam *hp, TextBuffer *buffer, uintptr_t *split) - { - auto __ = unindexablehooks_near.load(); - if (!__) - return; - if ((*((decltype(ptr) *)hp->user_value))(__)) - hp->type |= HOOK_EMPTY; - }; - NewHook(hp, (id + " Loader").c_str()); - } - } - return; + return HostInfo(HOSTINFO::EmuGameName, WideStringToString(game).c_str()); } }; hp.type = DIRECT_READ; @@ -123,7 +100,6 @@ bool vita3k::attach_function() { auto descriptor = *argidx(stack, idxDescriptor + 1); // r8 auto entrypoint = *argidx(stack, idxEntrypoint + 1); // r9 - unindexablehooks_near.store(entrypoint); auto em_address = *(uint32_t *)descriptor; if (em_address < 0x80000000) em_address += 0x80000000; // 0.1.9 3339 @@ -522,7 +498,6 @@ namespace auto _ = []() { - unindexablehooks = {}; emfunctionhooks = { // 追放選挙 {0x8002e176, {0, 0, 0, 0, FPCSG01023, "PCSG01023"}}, // dialogue+name,sjis