Timers now work properly in III/VC (Billie Jean plays again!)

This commit is contained in:
Silent 2014-08-27 02:44:49 +02:00
parent c19ae65d46
commit 9bfbcd83f0
2 changed files with 3 additions and 12 deletions

View file

@ -96,7 +96,7 @@ void CTimer::Resume()
// MVL fix
InitTimerFunc();
#endif
oldTime = timerFunction() - suspendTime;
oldTime += timerFunction() - suspendTime;
}
}
@ -116,17 +116,6 @@ unsigned int CTimer::GetCyclesPerMillisecond()
void CTimer::Update()
{
#ifdef SILENTPATCH_VC_VER
// CTimer::Initialise workaround
static bool bIntialisedIt = false;
if ( !bIntialisedIt )
{
Initialise();
bIntialisedIt = true;
}
#endif
*m_snPreviousTimeInMilliseconds = *m_snTimeInMilliseconds;
cyclesPreviousTime = cyclesTime;

View file

@ -290,6 +290,8 @@ BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
else if(*(DWORD*)0x667C40 == 0x53E58955) Patch_VC_11();
else if (*(DWORD*)0x666BA0 == 0x53E58955) Patch_VC_Steam();
else return FALSE;
CTimer::Initialise();
}
return TRUE;
}