From f8213e73fa56ccdf4f6fa59b3bf75a13da840e3a Mon Sep 17 00:00:00 2001 From: Sebastian Krzyszkowiak Date: Thu, 2 Nov 2023 07:40:39 +0100 Subject: [PATCH] emscripten: Dispatch hideLoading JS function before starting the mainloop --- src/libsuperderpy.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/libsuperderpy.c b/src/libsuperderpy.c index 11118d3..c970960 100644 --- a/src/libsuperderpy.c +++ b/src/libsuperderpy.c @@ -538,6 +538,9 @@ SYMBOL_EXPORT int libsuperderpy_run(struct Game* game) { PauseExecution(game); } emscripten_set_main_loop_arg(libsuperderpy_emscripten_mainloop, game, 0, false); + EM_ASM({ + if (Module.hideLoading) Module.hideLoading(); + }); return 0; #else while (libsuperderpy_mainloop(game)) {}