MCPcopy Index your code
hub / github.com/EmulatorJS/EmulatorJS / saveSettings

Method saveSettings

data/src/emulator.js:4129–4143  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

4127 };
4128 }
4129 saveSettings() {
4130 if (!window.localStorage || this.config.disableLocalStorage || !this.settingsLoaded) return;
4131 if (!this.started && !this.failedToStart) return;
4132 const coreSpecific = {
4133 controlSettings: this.controls,
4134 settings: this.settings,
4135 cheats: this.cheats
4136 }
4137 const ejs_settings = {
4138 volume: this.volume,
4139 muted: this.muted
4140 }
4141 localStorage.setItem("ejs-settings", JSON.stringify(ejs_settings));
4142 localStorage.setItem(this.getLocalStorageKey(), JSON.stringify(coreSpecific));
4143 }
4144 getLocalStorageKey() {
4145 let identifier = (this.config.gameId || 1) + "-" + this.getCore(true);
4146 if (typeof this.config.gameName === "string") {

Callers 7

createBottomMenuBarMethod · 0.95
keyChangeMethod · 0.95
gamepadEventMethod · 0.95
menuOptionChangedMethod · 0.95
createCheatsMenuMethod · 0.95
addToMenuMethod · 0.95

Calls 1

getLocalStorageKeyMethod · 0.95

Tested by

no test coverage detected