mirror of
https://github.com/godotengine/godot.git
synced 2025-10-20 00:13:30 +00:00
[HTML5] Make home path persistent in editor.
We used to only persist specific sub-folder of /home/web_user/ when running the Web Editor. This resulted in bad UX about default project creation path etc. This PR makes the whole folder persistent, move the zip preloading to a different folder (to avoid persisting it), and automatically prompt the user to import it if present.
This commit is contained in:
parent
9db7e07d5a
commit
95d2102565
2 changed files with 10 additions and 3 deletions
|
@ -88,6 +88,13 @@ extern EMSCRIPTEN_KEEPALIVE int godot_js_main(int argc, char *argv[]) {
|
|||
|
||||
Main::start();
|
||||
os->get_main_loop()->initialize();
|
||||
#ifdef TOOLS_ENABLED
|
||||
if (Main::is_project_manager() && FileAccess::exists("/tmp/preload.zip")) {
|
||||
PackedStringArray 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.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue