mirror of
https://github.com/EmulatorJS/EmulatorJS.git
synced 2024-09-20 02:46:23 +00:00
Pull webgl2 default enabled from core.json
This commit is contained in:
parent
4d2a1d0d40
commit
38a496a271
1 changed files with 6 additions and 2 deletions
|
@ -261,7 +261,7 @@ class EmulatorJS {
|
||||||
} else if (setting === "enabled") {
|
} else if (setting === "enabled") {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
return ["n64", "psx", "nds"].includes(this.getCore(true));
|
return null;
|
||||||
})();
|
})();
|
||||||
this.isSafari = /^((?!chrome|android).)*safari/i.test(navigator.userAgent);
|
this.isSafari = /^((?!chrome|android).)*safari/i.test(navigator.userAgent);
|
||||||
if (this.config.disableDatabases) {
|
if (this.config.disableDatabases) {
|
||||||
|
@ -632,6 +632,10 @@ class EmulatorJS {
|
||||||
this.extensions = core.extensions;
|
this.extensions = core.extensions;
|
||||||
this.coreName = core.name;
|
this.coreName = core.name;
|
||||||
this.repository = core.repo;
|
this.repository = core.repo;
|
||||||
|
this.defaultWebgl2 = core.options.defaultWebGL2 === true;
|
||||||
|
if (this.webgl2Enabled === null) {
|
||||||
|
this.webgl2Enabled = this.defaultWebgl2;
|
||||||
|
}
|
||||||
} else if (k === "license.txt") {
|
} else if (k === "license.txt") {
|
||||||
this.license = new TextDecoder().decode(data[k]);
|
this.license = new TextDecoder().decode(data[k]);
|
||||||
}
|
}
|
||||||
|
@ -4303,7 +4307,7 @@ class EmulatorJS {
|
||||||
addToMenu(this.localization('WebGL2') + "(" + this.localization('Requires page reload') + ")", 'webgl2Enabled', {
|
addToMenu(this.localization('WebGL2') + "(" + this.localization('Requires page reload') + ")", 'webgl2Enabled', {
|
||||||
'enabled': this.localization("Enabled"),
|
'enabled': this.localization("Enabled"),
|
||||||
'disabed': this.localization("Disabled")
|
'disabed': this.localization("Disabled")
|
||||||
}, ["n64", "psx", "nds"].includes(this.getCore(true)) ? "enabled" : "disabed");
|
}, this.defaultWebgl2 ? "enabled" : "disabed");
|
||||||
|
|
||||||
addToMenu(this.localization('FPS'), 'fps', {
|
addToMenu(this.localization('FPS'), 'fps', {
|
||||||
'show': this.localization("show"),
|
'show': this.localization("show"),
|
||||||
|
|
Loading…
Reference in a new issue