mirror of
https://github.com/CookiePLMonster/SilentPatch.git
synced 2024-11-22 05:22:32 +01:00
Slightly rework AudioUtilsGetCurrentTimeInMs not to lose precision
This commit is contained in:
parent
8d9ba3a97a
commit
49ab1a5ed8
@ -1230,7 +1230,6 @@ static LARGE_INTEGER UtilsFrequency;
|
||||
static BOOL WINAPI AudioUtilsFrequency( PLARGE_INTEGER lpFrequency )
|
||||
{
|
||||
::QueryPerformanceFrequency( &UtilsFrequency );
|
||||
UtilsFrequency.QuadPart /= 1000;
|
||||
lpFrequency->QuadPart = UtilsFrequency.QuadPart;
|
||||
return TRUE;
|
||||
}
|
||||
@ -1253,7 +1252,7 @@ static int64_t AudioUtilsGetCurrentTimeInMs()
|
||||
|
||||
LARGE_INTEGER currentTime;
|
||||
QueryPerformanceCounter( ¤tTime );
|
||||
return (currentTime.QuadPart - UtilsStartTime.QuadPart) / UtilsFrequency.QuadPart;
|
||||
return ((currentTime.QuadPart - UtilsStartTime.QuadPart) * 1000) / UtilsFrequency.QuadPart;
|
||||
}
|
||||
|
||||
// Minimal HUD changes
|
||||
|
Loading…
Reference in New Issue
Block a user