diff --git a/data/emulator.js b/data/emulator.js index 83c3f97..3966e34 100644 --- a/data/emulator.js +++ b/data/emulator.js @@ -304,21 +304,21 @@ class EmulatorJS { return check; })(); this.isSafari = /^((?!chrome|android).)*safari/i.test(navigator.userAgent); - if (config.disableDatabases) { + if (this.config.disableDatabases) { this.storage = { rom: new window.EJS_DUMMYSTORAGE(), bios: new window.EJS_DUMMYSTORAGE(), - core: new window.EJS_DUMMYSTORAGE(), - states: new window.EJS_DUMMYSTORAGE() + core: new window.EJS_DUMMYSTORAGE() } } else { this.storage = { rom: new window.EJS_STORAGE("EmulatorJS-roms", "rom"), bios: new window.EJS_STORAGE("EmulatorJS-bios", "bios"), - core: new window.EJS_STORAGE("EmulatorJS-core", "core"), - states: new window.EJS_STORAGE("EmulatorJS-states", "states") + core: new window.EJS_STORAGE("EmulatorJS-core", "core") } } + // This is not cache. This is save data + this.storage.states = new window.EJS_STORAGE("EmulatorJS-states", "states"); this.game.classList.add("ejs_game"); if (typeof this.config.backgroundImg === "string") { @@ -1750,6 +1750,7 @@ class EmulatorJS { const cache = addButton("Cache Manager", '', () => { this.openCacheMenu(); }); + if (this.config.disableDatabases) cache.style.display = "none"; let savUrl;