|
@@ -31,16 +31,12 @@
|
|
namespace love
|
|
namespace love
|
|
{
|
|
{
|
|
|
|
|
|
-// TODO: use ns.
|
|
|
|
|
|
+// TODO: use ns. https://github.com/libsdl-org/SDL/issues/11141
|
|
void sleep(double ms)
|
|
void sleep(double ms)
|
|
{
|
|
{
|
|
// We don't need to initialize the SDL timer subsystem for SDL_Delay to
|
|
// We don't need to initialize the SDL timer subsystem for SDL_Delay to
|
|
// function - and doing so causes SDL to create a worker thread.
|
|
// function - and doing so causes SDL to create a worker thread.
|
|
-#if SDL_VERSION_ATLEAST(3, 0, 0)
|
|
|
|
- SDL_DelayNS(SDL_MS_TO_NS(ms));
|
|
|
|
-#else
|
|
|
|
SDL_Delay((Uint32)ms);
|
|
SDL_Delay((Uint32)ms);
|
|
-#endif
|
|
|
|
}
|
|
}
|
|
|
|
|
|
} // love
|
|
} // love
|