You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-07 12:30:27 +00:00
JS synchronous start, better persistent FS sync.
The engine now expects to emscripten FS to be setup and sync-ed before main is called. This is exposed via `Module["initFS"]` which also allows to setup multiple persistence paths (internal use only for now). Additionally, FS syncing is done **once** for every loop if at least one file in a persistent path was open for writing and closed, and if the FS is not syncing already. This should potentially fix issues reported by users where "autosave" would not work on the web (never calling `syncfs` because of too many writes).
This commit is contained in:
@@ -71,8 +71,7 @@ class OS_JavaScript : public OS_Unix {
|
||||
|
||||
bool swap_ok_cancel;
|
||||
bool idb_available;
|
||||
int64_t sync_wait_time;
|
||||
int64_t last_sync_check_time;
|
||||
bool idb_needs_sync;
|
||||
|
||||
static EM_BOOL fullscreen_change_callback(int p_event_type, const EmscriptenFullscreenChangeEvent *p_event, void *p_user_data);
|
||||
|
||||
@@ -110,6 +109,7 @@ protected:
|
||||
|
||||
public:
|
||||
String canvas_id;
|
||||
bool idb_is_syncing;
|
||||
void finalize_async();
|
||||
bool check_size_force_redraw();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user