summaryrefslogtreecommitdiff
path: root/platform/web/os_web.cpp
diff options
context:
space:
mode:
authorFabio Alessandrelli <fabio.alessandrelli@gmail.com>2023-01-09 21:18:47 +0100
committerGitHub <noreply@github.com>2023-01-09 21:18:47 +0100
commit6b2abf4605dde65d58427df3317d104daebd5bda (patch)
treecf61367bd83e07a16b2e6260d6565f75dfa6c6ca /platform/web/os_web.cpp
parentf5f7d11ac47244e4cc02cd7336ba86e0ed272dc3 (diff)
parent615fd98620d577c82ed9d99fd51ceeee714430ba (diff)
Merge pull request #70626 from Faless/web/4.x_expose_force_fs_sync
[Web] Expose API to force file system sync.
Diffstat (limited to 'platform/web/os_web.cpp')
-rw-r--r--platform/web/os_web.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/platform/web/os_web.cpp b/platform/web/os_web.cpp
index cb304ce7ac..e12f62f4ad 100644
--- a/platform/web/os_web.cpp
+++ b/platform/web/os_web.cpp
@@ -196,6 +196,12 @@ void OS_Web::update_pwa_state_callback() {
}
}
+void OS_Web::force_fs_sync() {
+ if (is_userfs_persistent()) {
+ idb_needs_sync = true;
+ }
+}
+
Error OS_Web::pwa_update() {
return godot_js_pwa_update() ? FAILED : OK;
}