diff options
Diffstat (limited to 'src/saveload/saveload.cpp')
-rw-r--r-- | src/saveload/saveload.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/saveload/saveload.cpp b/src/saveload/saveload.cpp index 999a381d7..5288f9047 100644 --- a/src/saveload/saveload.cpp +++ b/src/saveload/saveload.cpp @@ -45,6 +45,9 @@ #include "../error.h" #include <atomic> #include <string> +#ifdef __EMSCRIPTEN__ +# include <emscripten.h> +#endif #include "table/strings.h" @@ -2495,6 +2498,10 @@ static void SaveFileDone() InvalidateWindowData(WC_STATUS_BAR, 0, SBI_SAVELOAD_FINISH); _sl.saveinprogress = false; + +#ifdef __EMSCRIPTEN__ + EM_ASM(if (window["openttd_syncfs"]) openttd_syncfs()); +#endif } /** Set the error message from outside of the actual loading/saving of the game (AfterLoadGame and friends) */ |