From fd987881d572014b20d3fb103c38e473346bef3d Mon Sep 17 00:00:00 2001 From: BroGamer <64546358+BroGamer4256@users.noreply.github.com> Date: Mon, 20 Jun 2022 08:50:11 +1200 Subject: [PATCH] Save settings cross session --- src/dllmain.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/dllmain.c b/src/dllmain.c index a8e0144..35821c6 100644 --- a/src/dllmain.c +++ b/src/dllmain.c @@ -118,7 +118,7 @@ HOOK_DYNAMIC (i64, __stdcall, ResetCoin) { i32 __stdcall DllMain (HMODULE mod, DWORD cause, void *ctx) { if (cause == DLL_PROCESS_DETACH) DisposePoll (); - if (cause != DLL_PROCESS_ATTACH) return 1; + if (cause != DLL_PROCESS_ATTACH) return true; // Blatantly stolen patches from mon.im WRITE_MEMORY (0x1400239C0, u8, 0xC3); // Stop error @@ -126,6 +126,10 @@ i32 __stdcall DllMain (HMODULE mod, DWORD cause, void *ctx) { WRITE_MEMORY (0x140692E17, u8, 0xEB); // Shared audio WRITE_MEMORY (0x140517339, u8, 0xBA, 0x00, 0x00, 0x00, 0x00, 0x90); // Disable VSync + // Blatantly stolen patches from openparrot + // Save settings cross session + WRITE_MEMORY (0x140B5C528, u8, "./Setting1.bin"); + WRITE_MEMORY (0x140B5C538, u8, "./Setting2.bin"); INSTALL_HOOK_DYNAMIC (ShowMouse, PROC_ADDRESS ("user32.dll", "ShowCursor")); INSTALL_HOOK_DYNAMIC (DecCoin, PROC_ADDRESS ("bnusio.dll", "bnusio_DecCoin"));