emscripten: Dispatch hideLoading JS function before starting the mainloop

This commit is contained in:
Sebastian Krzyszkowiak 2023-11-02 07:40:39 +01:00
parent 11cd2eb6ce
commit f8213e73fa
No known key found for this signature in database
GPG key ID: E8F235CF3BDBC3FF

View file

@ -538,6 +538,9 @@ SYMBOL_EXPORT int libsuperderpy_run(struct Game* game) {
PauseExecution(game); PauseExecution(game);
} }
emscripten_set_main_loop_arg(libsuperderpy_emscripten_mainloop, game, 0, false); emscripten_set_main_loop_arg(libsuperderpy_emscripten_mainloop, game, 0, false);
EM_ASM({
if (Module.hideLoading) Module.hideLoading();
});
return 0; return 0;
#else #else
while (libsuperderpy_mainloop(game)) {} while (libsuperderpy_mainloop(game)) {}