// The browser build: keeps the prefs folder (/libsdl, where SDL puts it on the web) in IndexedDB, loading it before // the game starts so saved settings are there when it reads them. The game writes it back after every save. Module.preRun = Module.preRun || []; Module.preRun.push(() => { FS.mkdir("/libsdl"); FS.mount(IDBFS, {}, "/libsdl"); addRunDependency("prefs"); FS.syncfs(true, () => removeRunDependency("prefs")); });