From f927cb94e9f1b0f083c3c6abf1b150888755efb1 Mon Sep 17 00:00:00 2001 From: Sebastian Krzyszkowiak Date: Thu, 2 Nov 2023 07:41:08 +0100 Subject: [PATCH] emscripten: Dispatch resize event on boot Workarounds invalid hidpi detection on launch. --- src/libsuperderpy.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/libsuperderpy.c b/src/libsuperderpy.c index c970960..a33ec9e 100644 --- a/src/libsuperderpy.c +++ b/src/libsuperderpy.c @@ -540,6 +540,7 @@ SYMBOL_EXPORT int libsuperderpy_run(struct Game* game) { emscripten_set_main_loop_arg(libsuperderpy_emscripten_mainloop, game, 0, false); EM_ASM({ if (Module.hideLoading) Module.hideLoading(); + window.dispatchEvent(new Event('resize')); }); return 0; #else