Skip to content

Commit 4d8f84f

Browse files
committed
timer: Use the emscripten-specific code on Emscripten, even with threading.
Fixes #14640.
1 parent 618eb57 commit 4d8f84f

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/timer/SDL_timer.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525

2626
// #define DEBUG_TIMERS
2727

28-
#if !defined(SDL_PLATFORM_EMSCRIPTEN) || !defined(SDL_THREADS_DISABLED)
28+
#if !defined(SDL_PLATFORM_EMSCRIPTEN)
2929

3030
typedef struct SDL_Timer
3131
{
@@ -407,7 +407,7 @@ bool SDL_RemoveTimer(SDL_TimerID id)
407407
}
408408
}
409409

410-
#else
410+
#else // Emscripten-specific implementation.
411411

412412
#include <emscripten/emscripten.h>
413413
#include <emscripten/eventloop.h>
@@ -533,7 +533,7 @@ bool SDL_RemoveTimer(SDL_TimerID id)
533533
}
534534
}
535535

536-
#endif // !SDL_PLATFORM_EMSCRIPTEN || !SDL_THREADS_DISABLED
536+
#endif // !SDL_PLATFORM_EMSCRIPTEN
537537

538538
static Uint64 tick_start;
539539
static Uint32 tick_numerator_ns;

0 commit comments

Comments
 (0)