mirror of
https://github.com/wangdage12/genshin-fps-unlock.git
synced 2026-02-18 02:42:13 +08:00
removed unused part
This commit is contained in:
@@ -351,33 +351,6 @@ int main(int argc, char** argv)
|
||||
printf("FPS Offset: %X\n", pfps);
|
||||
}
|
||||
|
||||
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ե<EFBFBD>ַ (<28><>ֱͬ<D6B1><CDAC>)
|
||||
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("<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ctrl + <20><>ͷ<EFBFBD><CDB7><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>:\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;
|
||||
// <20>رմ<D8B1>ֱͬ<D6B1><CDAC>
|
||||
WriteProcessMemory(pi.hProcess, (LPVOID)pvsync, &vsync, sizeof(vsync), nullptr);
|
||||
}
|
||||
}
|
||||
|
||||
CloseHandle(pi.hProcess);
|
||||
|
||||
Reference in New Issue
Block a user