Check that attempting to fetch a legacy core is a nintendo 64 core

This will be changed soon
This commit is contained in:
Ethan O'Brien 2024-01-17 22:33:55 -06:00
parent 011216b876
commit 88ec215493

View file

@ -638,7 +638,9 @@ class EmulatorJS {
this.initGameCore(js, wasm, thread); this.initGameCore(js, wasm, thread);
}); });
} }
let filename = this.getCore()+(this.config.threads ? "-thread" : "")+(this.supportsWebgl2 ? "" : "-legacy")+"-wasm.data"; let legacy = (this.supportsWebgl2 ? "" : "-legacy");
if ("n64" !== this.getCore(true)) legacy = "";
let filename = this.getCore()+(this.config.threads ? "-thread" : "")+legacy+"-wasm.data";
this.storage.core.get(filename).then((result) => { this.storage.core.get(filename).then((result) => {
if (result && result.version === this.version && !this.debug) { if (result && result.version === this.version && !this.debug) {
gotCore(result.data); gotCore(result.data);