From e3bc56c8f1d47750d7af330610ec9d414d7b6244 Mon Sep 17 00:00:00 2001 From: Ian Curtis Date: Tue, 14 Jun 2022 21:24:43 +0000 Subject: [PATCH] values must be signed, to handle negative numbers, my bad --- Src/OSD/SDL/Main.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Src/OSD/SDL/Main.cpp b/Src/OSD/SDL/Main.cpp index 4bf4247..67d6fbc 100644 --- a/Src/OSD/SDL/Main.cpp +++ b/Src/OSD/SDL/Main.cpp @@ -851,7 +851,7 @@ static void SuperSleepUntil(uint64_t target) // Compute the whole number of millis to sleep. Because OS sleep is not accurate, // we actually sleep for one less and will spin-wait for the final millisecond. - uint32_t numWholeMillisToSleep = uint32_t((target - time) * 1000 / s_perfCounterFrequency); + int32_t numWholeMillisToSleep = int32_t((target - time) * 1000 / s_perfCounterFrequency); numWholeMillisToSleep -= 1; if (numWholeMillisToSleep > 0) {