mirror of
https://github.com/CookiePLMonster/SilentPatch.git
synced 2024-12-29 15:23:02 +05:00
keep remainder while ticking SCM timers
This commit is contained in:
parent
fe46468e7c
commit
87e6f81883
1 changed files with 18 additions and 0 deletions
|
@ -1983,6 +1983,12 @@ int __stdcall Timers_ftol( double timer )
|
|||
return _Timers_ftol_internal( timer, TimersRemainder );
|
||||
}
|
||||
|
||||
int __stdcall Timers_ftol_SCMdelta( double timer )
|
||||
{
|
||||
static double TimersRemainder = 0.0;
|
||||
return _Timers_ftol_internal( timer, TimersRemainder );
|
||||
}
|
||||
|
||||
void __declspec(naked) asmTimers_ftol_PauseMode()
|
||||
{
|
||||
_asm
|
||||
|
@ -2016,6 +2022,17 @@ void __declspec(naked) asmTimers_ftol()
|
|||
}
|
||||
}
|
||||
|
||||
void __declspec(naked) asmTimers_SCMdelta()
|
||||
{
|
||||
_asm
|
||||
{
|
||||
sub esp, 8
|
||||
fstp qword ptr [esp]
|
||||
call Timers_ftol_SCMdelta
|
||||
retn
|
||||
}
|
||||
}
|
||||
|
||||
void __declspec(naked) GetMaxExtraDirectionals()
|
||||
{
|
||||
_asm
|
||||
|
@ -3210,6 +3227,7 @@ void Patch_SA_10()
|
|||
InjectHook( 0x561C32, asmTimers_ftol_PauseMode );
|
||||
InjectHook( 0x561902, asmTimers_ftol_NonClipped );
|
||||
InjectHook( 0x56191A, asmTimers_ftol );
|
||||
InjectHook( 0x46A036, asmTimers_SCMdelta );
|
||||
|
||||
|
||||
// Don't catch WM_SYSKEYDOWN and WM_SYSKEYUP (fixes Alt+F4)
|
||||
|
|
Loading…
Reference in a new issue