Initial source code support for SDL3. No build system support.

This commit is contained in:
Sasha Szpakowski
2024-02-04 17:02:26 -04:00
parent 5acc98ce43
commit 62ac858f30
23 changed files with 1622 additions and 161 deletions
+8 -2
View File
@@ -21,15 +21,21 @@
#include "delay.h"
#include <SDL_timer.h>
#include <SDL_version.h>
namespace love
{
void sleep(unsigned int ms)
// TODO: use ns.
void sleep(double ms)
{
// 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.
SDL_Delay(ms);
#if SDL_VERSION_ATLEAST(3, 0, 0)
SDL_DelayNS(SDL_MS_TO_NS(ms));
#else
SDL_Delay((Uint32)ms);
#endif
}
} // love