From 66be8e8f28a416d63848b25bccfaa797e69e27cf Mon Sep 17 00:00:00 2001
From: Alam Ed Arias <alam@srb2.org>
Date: Sun, 30 Mar 2025 14:44:14 -0400
Subject: [PATCH] Emscripten: only support thread with Emscripten's pthread
 enabled

---
 src/sdl/i_threads.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/src/sdl/i_threads.c b/src/sdl/i_threads.c
index 64e9ae142c..24c528900b 100644
--- a/src/sdl/i_threads.c
+++ b/src/sdl/i_threads.c
@@ -210,7 +210,11 @@ I_spawn_thread (
 int
 I_can_thread (void)
 {
+#ifdef __EMSCRIPTEN_PTHREADS__
+	return true;
+#else
 	return SDL_ThreadID() != 0;
+#endif
 }
 
 int
-- 
GitLab