emscripten: Dispatch resize event on boot

Workarounds invalid hidpi detection on launch.
This commit is contained in:
Sebastian Krzyszkowiak 2023-11-02 07:41:08 +01:00
parent f8213e73fa
commit f927cb94e9
No known key found for this signature in database
GPG key ID: E8F235CF3BDBC3FF

View file

@ -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