From 40959068c58e27c9133b8e9c3cc94669e9776c72 Mon Sep 17 00:00:00 2001 From: BroGamer <64546358+BroGamer4256@users.noreply.github.com> Date: Fri, 19 Aug 2022 02:19:02 +1200 Subject: [PATCH] Toggle unlocking songs --- dist/plugins/patches.toml | 1 + patches/8.18/dllmain.c | 8 ++++---- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/dist/plugins/patches.toml b/dist/plugins/patches.toml index d3ddc7b..5c78ba9 100644 --- a/dist/plugins/patches.toml +++ b/dist/plugins/patches.toml @@ -1,2 +1,3 @@ +unlock_songs = true shared_audio = true vsync = false diff --git a/patches/8.18/dllmain.c b/patches/8.18/dllmain.c index cbdfa9c..0369609 100644 --- a/patches/8.18/dllmain.c +++ b/patches/8.18/dllmain.c @@ -14,10 +14,10 @@ i32 __stdcall DllMain (HMODULE mod, DWORD cause, void *ctx) { toml_table_t *config = openConfig (configPath ("plugins/patches.toml")); if (!config) return 1; void *handle = GetModuleHandle (0); - WRITE_MEMORY (ASLR (0x1400239C0, handle), u8, 0xC3); // Stop error - WRITE_MEMORY (ASLR (0x140314E8D, handle), u8, 0xB0, 0x01); // Unlock songs - if (readConfigBool (config, "shared_audio", true)) WRITE_MEMORY (ASLR (0x140692E17, handle), u8, 0xEB); // Shared audio - WRITE_MEMORY (ASLR (0x140313726, handle), u8, 0x00, 0x7F); // Remove song limit + WRITE_MEMORY (ASLR (0x1400239C0, handle), u8, 0xC3); // Stop error + if (readConfigBool (config, "unlock_songs", true)) WRITE_MEMORY (ASLR (0x140314E8D, handle), u8, 0xB0, 0x01); // Unlock songs + if (readConfigBool (config, "shared_audio", true)) WRITE_MEMORY (ASLR (0x140692E17, handle), u8, 0xEB); // Shared audio + WRITE_MEMORY (ASLR (0x140313726, handle), u8, 0x00, 0x7F); // Remove song limit if (!readConfigBool (config, "vsync", false)) WRITE_MEMORY (ASLR (0x140517339, handle), u8, 0xBA, 0x00, 0x00, 0x00, 0x00, 0x90); // Disable VSync // Save settings cross session without F:/ and G:/ drive WRITE_MEMORY (ASLR (0x140B5C528, handle), u8, "./Setting1.bin");