diff options
author | Paul Sinnett <paul.sinnett@gmail.com> | 2024-07-03 19:04:43 +0100 |
---|---|---|
committer | Rémi Verschelde <rverschelde@gmail.com> | 2024-07-04 22:13:05 +0200 |
commit | db97d88214192e30bfbaa2fbcf84bd5dc026627c (patch) | |
tree | 7d0d3abe44bc56f8cd9f4837eca0dfa1b509d04b | |
parent | 4d984b63697d840f2c823608d2c46740fb44651a (diff) | |
download | redot-engine-db97d88214192e30bfbaa2fbcf84bd5dc026627c.tar.gz |
Fix preloading a zip in the web editor
-rw-r--r-- | platform/web/web_main.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/platform/web/web_main.cpp b/platform/web/web_main.cpp index 04513f6d57..eb61644066 100644 --- a/platform/web/web_main.cpp +++ b/platform/web/web_main.cpp @@ -35,6 +35,7 @@ #include "core/config/engine.h" #include "core/io/resource_loader.h" #include "main/main.h" +#include "scene/main/scene_tree.h" #include <emscripten/emscripten.h> #include <stdlib.h> @@ -130,7 +131,7 @@ extern EMSCRIPTEN_KEEPALIVE int godot_web_main(int argc, char *argv[]) { if (Engine::get_singleton()->is_project_manager_hint() && FileAccess::exists("/tmp/preload.zip")) { PackedStringArray ps; ps.push_back("/tmp/preload.zip"); - os->get_main_loop()->emit_signal(SNAME("files_dropped"), ps, -1); + SceneTree::get_singleton()->get_root()->emit_signal(SNAME("files_dropped"), ps); } #endif emscripten_set_main_loop(main_loop_callback, -1, false); |