projects
/
rocksndiamonds.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
f4fba78
)
fixed threads for Emscripten
author
Holger Schemel
<info@artsoft.org>
Thu, 23 Sep 2021 07:48:59 +0000
(09:48 +0200)
committer
Holger Schemel
<info@artsoft.org>
Thu, 23 Sep 2021 07:48:59 +0000
(09:48 +0200)
src/files.c
patch
|
blob
|
history
diff --git
a/src/files.c
b/src/files.c
index 06c1ac510620b3280a547a9ba2d14d457d567267..a2b1bedaa81d7071f990c12d6452d498b0b151a6 100644
(file)
--- a/
src/files.c
+++ b/
src/files.c
@@
-9032,6
+9032,10
@@
void SaveScore(int nr)
void ExecuteAsThread(SDL_ThreadFunction function, char *name, void *data,
char *error)
{
void ExecuteAsThread(SDL_ThreadFunction function, char *name, void *data,
char *error)
{
+#if defined(PLATFORM_EMSCRIPTEN)
+ // threads currently not fully supported by Emscripten/SDL and some browsers
+ function(data);
+#else
SDL_Thread *thread = SDL_CreateThread(function, name, data);
if (thread != NULL)
SDL_Thread *thread = SDL_CreateThread(function, name, data);
if (thread != NULL)
@@
-9041,6
+9045,7
@@
void ExecuteAsThread(SDL_ThreadFunction function, char *name, void *data,
// nasty kludge to lower probability of intermingled thread error messages
Delay(1);
// nasty kludge to lower probability of intermingled thread error messages
Delay(1);
+#endif
}
char *getPasswordJSON(char *password)
}
char *getPasswordJSON(char *password)