mirror of
https://github.com/godotengine/godot.git
synced 2025-11-09 01:51:10 +00:00
Fix preloading a zip in the web editor
This commit is contained in:
parent
4d984b6369
commit
db97d88214
1 changed files with 2 additions and 1 deletions
|
|
@ -35,6 +35,7 @@
|
||||||
#include "core/config/engine.h"
|
#include "core/config/engine.h"
|
||||||
#include "core/io/resource_loader.h"
|
#include "core/io/resource_loader.h"
|
||||||
#include "main/main.h"
|
#include "main/main.h"
|
||||||
|
#include "scene/main/scene_tree.h"
|
||||||
|
|
||||||
#include <emscripten/emscripten.h>
|
#include <emscripten/emscripten.h>
|
||||||
#include <stdlib.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")) {
|
if (Engine::get_singleton()->is_project_manager_hint() && FileAccess::exists("/tmp/preload.zip")) {
|
||||||
PackedStringArray ps;
|
PackedStringArray ps;
|
||||||
ps.push_back("/tmp/preload.zip");
|
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
|
#endif
|
||||||
emscripten_set_main_loop(main_loop_callback, -1, false);
|
emscripten_set_main_loop(main_loop_callback, -1, false);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue