Merge pull request #45706 from Faless/js/3.x_editor_preload

[3.2] [HTML5] Better editor persistent folders, automatically open zip import popup
This commit is contained in:
Rémi Verschelde
2021-02-04 14:54:04 +01:00
committed by GitHub
3 changed files with 15 additions and 3 deletions

View File

@@ -87,6 +87,13 @@ extern EMSCRIPTEN_KEEPALIVE int godot_js_main(int argc, char *argv[]) {
ResourceLoader::set_abort_on_missing_resources(false);
Main::start();
os->get_main_loop()->init();
#ifdef TOOLS_ENABLED
if (Main::is_project_manager() && FileAccess::exists("/tmp/preload.zip")) {
PoolStringArray ps;
ps.push_back("/tmp/preload.zip");
os->get_main_loop()->emit_signal("files_dropped", ps, -1);
}
#endif
emscripten_set_main_loop(main_loop_callback, -1, false);
// Immediately run the first iteration.
// We are inside an animation frame, we want to immediately draw on the newly setup canvas.