Mercurial > repos > blastem
diff emscripten_pre.js @ 2658:99297d5f4c5d
Persist save states and config in emscripten build via IDBFS module
author | Michael Pavone <pavone@retrodev.com> |
---|---|
date | Tue, 04 Mar 2025 00:05:12 -0800 |
parents | |
children |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/emscripten_pre.js Tue Mar 04 00:05:12 2025 -0800 @@ -0,0 +1,10 @@ +Module.noInitialRun = true; +Module.preRun = [() => { + FS.mount(IDBFS, {autoPersist: true}, '/home/web_user'); + FS.syncfs(true, (err) => { + if (err) { + console.log('Error loading IDBFS', err); + } + Module.callMain(); + }); +}];