early-access version 1617

This commit is contained in:
pineappleEA
2021-04-20 21:40:33 +02:00
parent 242b6f6b49
commit f46563104f
510 changed files with 141726 additions and 62846 deletions
+12 -1
View File
@@ -28,9 +28,13 @@
#include <errno.h>
#include "SDL_timer.h"
#include "SDL_assert.h"
#include "SDL_hints.h"
#include "../SDL_timer_c.h"
#ifdef __EMSCRIPTEN__
#include <emscripten.h>
#endif
/* The clock_gettime provides monotonous time, so we should use it if
it's available. The clock_gettime function is behind ifdef
for __USE_POSIX199309
@@ -186,6 +190,13 @@ SDL_GetPerformanceFrequency(void)
void
SDL_Delay(Uint32 ms)
{
#ifdef __EMSCRIPTEN__
if (emscripten_has_asyncify() && SDL_GetHintBoolean(SDL_HINT_EMSCRIPTEN_ASYNCIFY, SDL_TRUE)) {
/* pseudo-synchronous pause, used directly or through e.g. SDL_WaitEvent */
emscripten_sleep(ms);
return;
}
#endif
int was_error;
#if HAVE_NANOSLEEP