From b3c55477de6e7844516b6d8a46314f78318ff95f Mon Sep 17 00:00:00 2001 From: Ethan O'Brien Date: Wed, 8 Jan 2025 09:36:39 -0600 Subject: [PATCH] Prioritize gameName for local storage identifier --- data/src/emulator.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/data/src/emulator.js b/data/src/emulator.js index 004df96..9c077ce 100644 --- a/data/src/emulator.js +++ b/data/src/emulator.js @@ -3792,7 +3792,9 @@ class EmulatorJS { } getLocalStorageKey() { let identifier = (this.config.gameId || 1) + "-" + this.getCore(true); - if (typeof this.config.gameUrl === "string" && !this.config.gameUrl.toLowerCase().startsWith("blob:")) { + if (typeof this.config.gameName === "string") { + identifier += "-" + this.config.gameName; + } else if (typeof this.config.gameUrl === "string" && !this.config.gameUrl.toLowerCase().startsWith("blob:")) { identifier += "-" + this.config.gameUrl; } else if (this.config.gameUrl instanceof File) { identifier += "-" + this.config.gameUrl.name;