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

Method preGetSetting

data/src/emulator.js:4157–4173  ·  view source on GitHub ↗
(setting)

Source from the content-addressed store, hash-verified

4155 return "ejs-" + identifier + "-settings";
4156 }
4157 preGetSetting(setting) {
4158 if (window.localStorage && !this.config.disableLocalStorage) {
4159 let coreSpecific = localStorage.getItem(this.getLocalStorageKey());
4160 try {
4161 coreSpecific = JSON.parse(coreSpecific);
4162 if (coreSpecific && coreSpecific.settings) {
4163 return coreSpecific.settings[setting];
4164 }
4165 } catch(e) {
4166 console.warn("Could not load previous settings", e);
4167 }
4168 }
4169 if (this.config.defaultOptions && this.config.defaultOptions[setting]) {
4170 return this.config.defaultOptions[setting];
4171 }
4172 return null;
4173 }
4174 getCoreSettings() {
4175 if (!window.localStorage || this.config.disableLocalStorage) {
4176 if (this.config.defaultOptions) {

Callers 5

getCoreMethod · 0.95
constructorMethod · 0.95
downloadGameCoreMethod · 0.95
createBottomMenuBarMethod · 0.95
getRetroArchCfgMethod · 0.80

Calls 1

getLocalStorageKeyMethod · 0.95

Tested by

no test coverage detected