diff --git a/ClairObscur/dllmain.cpp b/ClairObscur/dllmain.cpp index 67ab936..db225de 100644 --- a/ClairObscur/dllmain.cpp +++ b/ClairObscur/dllmain.cpp @@ -75,7 +75,7 @@ static SafetyHookMid UltraWideHook{}; // Prototypes static void FOVFixEnabled(); -static void UltraWideFixEnabled(GameFixes fix); +static void UltraWideFixEnabled(); static void CameraFixEnabled(); static void CutscenesFPSFixEnabled(); static void HUDUpdate(bool writeLog); @@ -97,9 +97,6 @@ extern "C" __declspec(dllexport) void SetFixEnabled(bool enabled, bool init) { constexpr auto CutscenesFPS2StringObfuscated = make_obfuscated<0x0F>("0F 84 ?? ?? ?? ?? 48 8D ?? ?? ?? 48 89 ?? ?? ?? E8 ?? ?? ?? ?? 83 78"); constexpr auto CameraStruct1StringObfuscated = make_obfuscated<0x48>("48 89 ?? ?? ?? 57 48 83 ?? ?? 0F ?? ?? 48 8B FA 48 ?? ?? 0F ?? ?? F2 0F 10"); constexpr auto CameraStringObfuscated = make_obfuscated<0x28>("F2 0F 10 ?? ?? ?? 0F 28 ?? ?? ?? ?? ?? F2 0F ?? ?? ?? F2 0F ?? ?? ?? 0F ?? ?? 0F"); - constexpr auto CAStringObfuscated = make_obfuscated<0x39>("7F ?? 44 89 ?? ?? ?? ?? ?? 43 8B ?? ?? 39 05 ?? ?? ?? ?? 0F 8F"); - constexpr auto DOFStringObfuscated = make_obfuscated<0xC1>("8B ?? ?? 48 ?? ?? E8 ?? ?? ?? ?? 0F ?? ?? 48 6B ?? ?? 48 8D"); - constexpr auto FogStringObfuscated = make_obfuscated<0x75>("74 ?? 48 8B ?? ?? ?? ?? ?? 83 ?? ?? ?? 75 ?? 40 ?? ?? EB ?? 40 ?? ?? 48 8B"); constexpr auto WorldTimeDilationStringObfuscated = make_obfuscated<0x59>("F3 0F 10 ?? ?? ?? ?? ?? F3 0F 59 ?? ?? ?? ?? ?? F3 0F 59 ?? ?? ?? ?? ?? C3"); constexpr auto TimeDilationStringObfuscated = make_obfuscated<0x59>("F3 0F ?? ?? ?? EB ?? F3 0F ?? ?? ?? ?? ?? ?? 48 8B ?? ?? 4C ?? ?? F3 0F ?? ?? 44"); @@ -149,7 +146,7 @@ extern "C" __declspec(dllexport) void SetFixEnabled(bool enabled, bool init) { ProcessEvent(); if (init) return; FOVFixEnabled(); - UltraWideFixEnabled(GameFixes::UltraWide); + UltraWideFixEnabled(); CutscenesFPSFixEnabled(); CameraFixEnabled(); HUDUpdate(true); @@ -166,7 +163,7 @@ extern "C" __declspec(dllexport) void SetFixesEnabled(GameFixes fix, bool enable if (fix == GameFixes::SkipIntro) { g_SkipIntros_enabled = enabled; } if (fix == GameFixes::FOV) { g_fov_fix_enabled = enabled; FOVFixEnabled(); } if (fix == GameFixes::Framerate) { g_CutscenesFPS_fix_enabled = enabled; CutscenesFPSFixEnabled(); } - if (fix == GameFixes::UltraWide) { g_ultrawide_fix_enabled = enabled; UltraWideFixEnabled(GameFixes::UltraWide); } + if (fix == GameFixes::UltraWide) { g_ultrawide_fix_enabled = enabled; UltraWideFixEnabled(); } if (fix == GameFixes::Camera) { g_camera_fix_enabled = enabled; CameraFixEnabled(); } if (fix == GameFixes::HUD) { g_HUD_fix_enabled = enabled; HUDUpdate(true); } if (fix == GameFixes::DOF) { g_DOF_fix_enabled = enabled; gPendingDOF = true; LogFixToggle(fix, bVisual); } @@ -324,7 +321,7 @@ static void FOVFixEnabled() { logger->info("FOV fix {}", g_fix_enabled && g_fov_fix_enabled ? "enabled" : "disabled"); } -static void UltraWideFixEnabled(GameFixes fix) { +static void UltraWideFixEnabled() { if (g_fix_enabled && g_ultrawide_fix_enabled && CameraComponentaddress && CameraStructaddress) { // Taken FROM UUU if (!UltraWideHook) { // Hook only once UltraWideHook = safetyhook::create_mid(CameraComponentaddress + 0x15,