summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
author Justin Kerk <dopefishjustin@gmail.com>2018-05-01 04:49:48 +0000
committer Justin Kerk <dopefishjustin@gmail.com>2018-05-01 04:49:48 +0000
commitab7a8ecc6f56ad64aeeadcd2a6edffe328a9d9d5 (patch)
tree5fc31e366e635423fea064c7cc62704cdc2c7cac
parent42a7f3d96ce25cf96441d19301f5b52367782d90 (diff)
Really disable multithreading on the Emscripten target (nw)
-rw-r--r--src/osd/osdsync.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/osd/osdsync.cpp b/src/osd/osdsync.cpp
index 984d3b3b802..f8143aa2c51 100644
--- a/src/osd/osdsync.cpp
+++ b/src/osd/osdsync.cpp
@@ -275,6 +275,11 @@ osd_work_queue *osd_work_queue_alloc(int flags)
if (osdworkqueuemaxthreads != nullptr && sscanf(osdworkqueuemaxthreads, "%d", &osdthreadnum) == 1 && threadnum > osdthreadnum)
threadnum = osdthreadnum;
+#if defined(SDLMAME_EMSCRIPTEN)
+ // threads are not supported at all
+ threadnum = 0;
+#endif
+
// clamp to the maximum
queue->threads = std::min(threadnum, WORK_MAX_THREADS);