Merge pull request #19375 from hrydgard/retro-buildfix

Replace call of SetWaitableTimerEx with SetWaitableTimer
This commit is contained in:
Henrik Rydgård 2024-07-29 08:12:36 -06:00 committed by GitHub
commit 52cf10274c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -283,7 +283,8 @@ void sleep_precise(double seconds) {
break;
LARGE_INTEGER due;
due.QuadPart = -(sleepTicks > maxTicks ? maxTicks : sleepTicks);
SetWaitableTimerEx(Timer, &due, 0, NULL, NULL, NULL, 0);
// Note: SetWaitableTimerEx is not available on Vista.
SetWaitableTimer(Timer, &due, 0, NULL, NULL, NULL);
WaitForSingleObject(Timer, INFINITE);
QueryPerformanceCounter(&qpc);
}