From 592d9c5d6939cb75649511fa2deeedbb42e68f64 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henrik=20Rydg=C3=A5rd?= Date: Mon, 29 Jul 2024 08:11:19 -0600 Subject: [PATCH] Replace SetWaitableTimerEx with SetWaitableTimer This makes the build work on retroarch's build server, and keeps compatibility with Windows Vista (although we hardly test for that). --- Common/TimeUtil.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Common/TimeUtil.cpp b/Common/TimeUtil.cpp index 74e9176f57..116e91813e 100644 --- a/Common/TimeUtil.cpp +++ b/Common/TimeUtil.cpp @@ -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); }