From a94d2e929dac288a2cebc9bad7329518bde5a4a7 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?R=C3=A9my=20Tassoux?= <[EMAIL REDACTED]>
Date: Wed, 5 Oct 2022 00:29:21 +0200
Subject: [PATCH] Prevent the delay conversion result from being truncated to
32bits
---
src/timer/windows/SDL_systimer.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/timer/windows/SDL_systimer.c b/src/timer/windows/SDL_systimer.c
index ff4cc981fb5f..b9c96461db00 100644
--- a/src/timer/windows/SDL_systimer.c
+++ b/src/timer/windows/SDL_systimer.c
@@ -164,7 +164,7 @@ SDL_Delay(Uint32 ms)
HANDLE timer = CreateWaitableTimerExW(NULL, NULL, CREATE_WAITABLE_TIMER_HIGH_RESOLUTION, TIMER_ALL_ACCESS);
if (timer) {
LARGE_INTEGER due_time;
- due_time.QuadPart = -(LONGLONG)(ms * 10000);
+ due_time.QuadPart = -(ms * 10000LL);
if (SetWaitableTimerEx(timer, &due_time, 0, NULL, NULL, NULL, 0)) {
WaitForSingleObject(timer, INFINITE);
}