From fc09681cdde044556eca84568793380b797b019b Mon Sep 17 00:00:00 2001 From: Michael Green <84688932+michael-j-green@users.noreply.github.com> Date: Sun, 1 Sep 2024 23:25:57 +1000 Subject: [PATCH] Fixes a bug where the state manager would show an empty list (#410) --- gaseous-server/Support/PlatformMap.json | 23 +++++++++++++++++++---- gaseous-server/wwwroot/pages/game.js | 3 ++- 2 files changed, 21 insertions(+), 5 deletions(-) diff --git a/gaseous-server/Support/PlatformMap.json b/gaseous-server/Support/PlatformMap.json index b4c9210..9e8e4d0 100644 --- a/gaseous-server/Support/PlatformMap.json +++ b/gaseous-server/Support/PlatformMap.json @@ -3391,14 +3391,29 @@ "ZX81" ], "Extensions": { - "SupportedFileExtensions": [], + "SupportedFileExtensions": [ + ".P", + ".TZX", + ".T81" + ], "UniqueFileExtensions": [] }, "RetroPieDirectoryName": "", "WebEmulator": { - "Type": "", - "Core": "", - "AvailableWebEmulators": null + "Type": "EmulatorJS", + "Core": "81", + "AvailableWebEmulators": [ + { + "EmulatorType": "EmulatorJS", + "AvailableWebEmulatorCores": [ + { + "Core": "81", + "AlternateCoreName": "81", + "Default": true + } + ] + } + ] }, "Bios": [] }, diff --git a/gaseous-server/wwwroot/pages/game.js b/gaseous-server/wwwroot/pages/game.js index eacfb91..e133059 100644 --- a/gaseous-server/wwwroot/pages/game.js +++ b/gaseous-server/wwwroot/pages/game.js @@ -432,7 +432,7 @@ function LoadGamePlatforms() { if (result[i].emulatorConfiguration.emulatorType.length > 0 && result[i].emulatorConfiguration.core.length > 0 && result[i].favouriteRomId) { showSaveState = true; romId = result[i].favouriteRomId; - isMediaGroup = result[i].favouriteIsMediaGroup; + isMediaGroup = result[i].favouriteRomIsMediagroup; platformItem.setAttribute('isFavourite', true); platformItem.classList.add('platform_item_green'); @@ -492,6 +492,7 @@ function LoadGamePlatforms() { platformStateManagerButton.innerHTML = ''; platformStateManagerButton.addEventListener('click', (e) => { e.stopPropagation(); + console.log('RomID: ' + romId + ' isMediaGroup: ' + isMediaGroup); let stateManager = new EmulatorStateManager(romId, isMediaGroup, platformData.emulatorConfiguration.emulatorType, platformData.emulatorConfiguration.core, platformData.id, gameId, platformData.lastPlayedRomName); stateManager.open(); });