Emscripten: Sync FS before closing the browser window

This commit is contained in:
Sergii Pylypenko
2021-05-16 01:25:34 +03:00
parent 5be853ed09
commit 960e1a7957

View File

@@ -177,7 +177,7 @@
document.getElementById("title").innerHTML = "Thank you for playing!";
document.getElementById("message").innerHTML = "We hope you enjoyed OpenTTD!<br/><br/>Reload your browser to restart the game.";
window.close('','_parent','');
FS.syncfs(false, function (err) { window.close('','_parent',''); });
},
onAbort: function() {