add ejs thread variable (for testing)

This commit is contained in:
Ethan O'Brien 2023-08-24 12:57:46 -04:00
parent 3dcd8c91c3
commit b8fd074f7f
2 changed files with 4 additions and 2 deletions

View file

@ -598,7 +598,8 @@ class EmulatorJS {
gotCore(result.data);
return;
}
this.downloadFile('cores/'+this.getCore()+'-wasm.data', (res) => {
let corePath = 'cores/'+this.getCore()+(this.config.threads ? "-thread" : "")+'-wasm.data';
this.downloadFile(corePath, (res) => {
if (res === -1) {
this.textElem.innerText = this.localization('Network Error');
this.textElem.style.color = "red";

View file

@ -77,6 +77,7 @@
config.backgroundBlur = window.EJS_backgroundBlur;
config.backgroundColor = window.EJS_backgroundColor;
config.controlScheme = window.EJS_controlScheme;
config.threads = window.EJS_threads;
if (typeof window.EJS_language === "string" && window.EJS_language !== "en-US") {
try {
@ -107,4 +108,4 @@
if (typeof window.EJS_onSaveState === "function") {
window.EJS_emulator.on("save", window.EJS_onSaveState);
}
})();
})();