From 88ec215493a0f543dd0814ec9e9fcf4baff8e407 Mon Sep 17 00:00:00 2001 From: Ethan O'Brien <77750390+ethanaobrien@users.noreply.github.com> Date: Wed, 17 Jan 2024 22:33:55 -0600 Subject: [PATCH] Check that attempting to fetch a legacy core is a nintendo 64 core This will be changed soon --- data/emulator.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/data/emulator.js b/data/emulator.js index aec72c9..e4dd2f6 100644 --- a/data/emulator.js +++ b/data/emulator.js @@ -638,7 +638,9 @@ class EmulatorJS { 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) => { if (result && result.version === this.version && !this.debug) { gotCore(result.data);