mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-09-15 07:48:14 +00:00
Windows: make sure SDL_TicksInit has been called before calling Sleep(ms) in SDL_Delay. This ensures the Windows system timer resolution is properly set before Sleep is called.
This commit is contained in:
@@ -189,6 +189,10 @@ SDL_Delay(Uint32 ms)
|
||||
}
|
||||
WaitForSingleObjectEx(mutex, ms, FALSE);
|
||||
#else
|
||||
if (!ticks_started) {
|
||||
SDL_TicksInit();
|
||||
}
|
||||
|
||||
Sleep(ms);
|
||||
#endif
|
||||
}
|
||||
|
Reference in New Issue
Block a user