From 7ba2209124117566ab206aab6007eb056009d1bb Mon Sep 17 00:00:00 2001 From: Alibek Omarov Date: Sat, 15 Feb 2025 13:08:02 +0300 Subject: [PATCH] engine: platform: sdl: set requested timer delay in units of 100ns according to the documentation --- engine/platform/win32/sys_win.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/engine/platform/win32/sys_win.c b/engine/platform/win32/sys_win.c index ff886b67..76baac43 100644 --- a/engine/platform/win32/sys_win.c +++ b/engine/platform/win32/sys_win.c @@ -79,11 +79,13 @@ void Win32_Shutdown( void ) qboolean Win32_NanoSleep( int nsec ) { - const LARGE_INTEGER ts = { -nsec }; + LARGE_INTEGER ts; if( !g_waitable_timer ) return false; + ts.QuadPart = { -nsec / 100 }; + if( !SetWaitableTimer( g_waitable_timer, &ts, 0, NULL, NULL, FALSE )) { CloseHandle( g_waitable_timer );