From 3dc77fdd1dac23c74737379a32c0feb58fdbdcbb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=9CRiceCake=E2=80=9D?= <“1250839773a@gmail.com”> Date: Thu, 13 Jun 2024 10:20:17 +0800 Subject: [PATCH] removed unused part --- unlockfps/main.cpp | 35 ----------------------------------- 1 file changed, 35 deletions(-) diff --git a/unlockfps/main.cpp b/unlockfps/main.cpp index 4b97a1d..77df06e 100644 --- a/unlockfps/main.cpp +++ b/unlockfps/main.cpp @@ -351,33 +351,6 @@ int main(int argc, char** argv) printf("FPS Offset: %X\n", pfps); } - // Եַ (ֱͬ) - address = PatternScan(up, "E8 ? ? ? ? 8B E8 49 8B 1E"); - uintptr_t pvsync = 0; - if (address) - { - uintptr_t ppvsync = 0; - uintptr_t rip = address; - int32_t rel = *(int32_t*)(rip + 1); - rip = rip + rel + 5; - uint64_t rax = *(uint32_t*)(rip + 3); - ppvsync = rip + rax + 7; - ppvsync -= (uintptr_t)up; - printf("VSync Offset: %X\n", ppvsync); - ppvsync = (uintptr_t)hUnityPlayer.modBaseAddr + ppvsync; - - uintptr_t buffer = 0; - while (!buffer) - { - ReadProcessMemory(pi.hProcess, (LPCVOID)ppvsync, &buffer, sizeof(buffer), nullptr); - std::this_thread::sleep_for(std::chrono::milliseconds(100)); - } - - rip += 7; - pvsync = *(uint32_t*)(rip + 2); - pvsync = buffer + pvsync; - } - VirtualFree(up, 0, MEM_RELEASE); printf("Done\n\n"); printf("ctrl + ͷ:\n"); @@ -405,14 +378,6 @@ int main(int argc, char** argv) if (fps != TargetFPS) WriteProcessMemory(pi.hProcess, (LPVOID)pfps, &TargetFPS, sizeof(TargetFPS), nullptr); - int vsync = 0; - ReadProcessMemory(pi.hProcess, (LPVOID)pvsync, &vsync, sizeof(vsync), nullptr); - if (vsync) - { - vsync = 0; - // رմֱͬ - WriteProcessMemory(pi.hProcess, (LPVOID)pvsync, &vsync, sizeof(vsync), nullptr); - } } CloseHandle(pi.hProcess);