From c587821c63b80ecda9383327911a570a8f25b87a Mon Sep 17 00:00:00 2001 From: Silent Date: Thu, 10 Mar 2016 20:25:04 +0100 Subject: [PATCH] III 1.1 mouse sens fix backported to 1.0 --- SilentPatchIII/SilentPatchIII.cpp | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/SilentPatchIII/SilentPatchIII.cpp b/SilentPatchIII/SilentPatchIII.cpp index cca292d..688e0c5 100644 --- a/SilentPatchIII/SilentPatchIII.cpp +++ b/SilentPatchIII/SilentPatchIII.cpp @@ -219,6 +219,21 @@ void __declspec(naked) SubtitlesShadowFix() } } +void __declspec(naked) III_SensResetFix() +{ + _asm + { + mov ecx, 3A76h + mov edi, ebp + fld dword ptr [ebp+194h] + fld dword ptr [ebp+198h] + rep stosd + fstp dword ptr [ebp+198h] + fstp dword ptr [ebp+194h] + retn + } +} + char** const ppUserFilesDir = AddressByVersion(0x580C16, 0x580F66, 0x580E66); char* GetMyDocumentsPath() @@ -365,6 +380,11 @@ void Patch_III_10(const RECT& desktop) // BOOOOORING fixed Patch(0x4925D7, 10); + // 1.1 mouse sensitivity not resetting fix + Patch(0x46BE81, 0x12EB); + Nop(0x46BAD6, 4); + InjectHook(0x46BADA, III_SensResetFix, PATCH_CALL); + // (Hopefully) more precise frame limiter int pAddress = 0x582EFD; RsEventHandler = (void(*)(int,void*))(*(int*)(pAddress+1) + pAddress + 5);