From d6199c9598d4041765e0d7bf9584cc74433215ef Mon Sep 17 00:00:00 2001 From: sergystepanov Date: Wed, 24 Jul 2024 20:31:12 +0300 Subject: [PATCH] Use ROM folders Libretro cores are selected based on the file extensions of the ROMs. However, ROM file extensions are not unique across cores (e.g., .zip is used in both DosBox and MAME). To load a specific core correctly, it's necessary to place the corresponding ROMs in designated folders specified in the configuration. By default, you can use the keys from cores.list as the folder names, or you can specify your own custom folder names using the 'folder' parameter for each core. --- assets/games/{ => gba}/Sushi The Cat.gba | Bin assets/games/{ => gba}/anguna.gba | Bin .../games/{ => n64}/Sample Demo by Florian (PD).z64 | Bin assets/games/{ => nes}/Alwa's Awakening (Demo).nes | Bin pkg/worker/caged/libretro/frontend_test.go | 6 +++--- pkg/worker/room/room_test.go | 6 +++--- 6 files changed, 6 insertions(+), 6 deletions(-) rename assets/games/{ => gba}/Sushi The Cat.gba (100%) rename assets/games/{ => gba}/anguna.gba (100%) rename assets/games/{ => n64}/Sample Demo by Florian (PD).z64 (100%) rename assets/games/{ => nes}/Alwa's Awakening (Demo).nes (100%) diff --git a/assets/games/Sushi The Cat.gba b/assets/games/gba/Sushi The Cat.gba similarity index 100% rename from assets/games/Sushi The Cat.gba rename to assets/games/gba/Sushi The Cat.gba diff --git a/assets/games/anguna.gba b/assets/games/gba/anguna.gba similarity index 100% rename from assets/games/anguna.gba rename to assets/games/gba/anguna.gba diff --git a/assets/games/Sample Demo by Florian (PD).z64 b/assets/games/n64/Sample Demo by Florian (PD).z64 similarity index 100% rename from assets/games/Sample Demo by Florian (PD).z64 rename to assets/games/n64/Sample Demo by Florian (PD).z64 diff --git a/assets/games/Alwa's Awakening (Demo).nes b/assets/games/nes/Alwa's Awakening (Demo).nes similarity index 100% rename from assets/games/Alwa's Awakening (Demo).nes rename to assets/games/nes/Alwa's Awakening (Demo).nes diff --git a/pkg/worker/caged/libretro/frontend_test.go b/pkg/worker/caged/libretro/frontend_test.go index 38584275b..e4b15dd7e 100644 --- a/pkg/worker/caged/libretro/frontend_test.go +++ b/pkg/worker/caged/libretro/frontend_test.go @@ -44,9 +44,9 @@ type game struct { } var ( - alwa = game{system: "nes", rom: "Alwa's Awakening (Demo).nes"} - sushi = game{system: "gba", rom: "Sushi The Cat.gba"} - angua = game{system: "gba", rom: "anguna.gba"} + alwa = game{system: "nes", rom: "nes/Alwa's Awakening (Demo).nes"} + sushi = game{system: "gba", rom: "gba/Sushi The Cat.gba"} + angua = game{system: "gba", rom: "gba/anguna.gba"} ) // TestMain runs all tests in the main thread in macOS. diff --git a/pkg/worker/room/room_test.go b/pkg/worker/room/room_test.go index 2be732d5a..ced965c28 100644 --- a/pkg/worker/room/room_test.go +++ b/pkg/worker/room/room_test.go @@ -95,9 +95,9 @@ var testTempDir = filepath.Join(os.TempDir(), "cloud-game-core-tests") // games var ( - alwas = games.GameMetadata{Name: "Alwa's Awakening (Demo)", Type: "nes", Path: "Alwa's Awakening (Demo).nes", System: "nes"} - sushi = games.GameMetadata{Name: "Sushi The Cat", Type: "gba", Path: "Sushi The Cat.gba", System: "gba"} - fd = games.GameMetadata{Name: "Florian Demo", Type: "n64", Path: "Sample Demo by Florian (PD).z64", System: "n64"} + alwas = games.GameMetadata{Name: "Alwa's Awakening (Demo)", Type: "nes", Path: "nes/Alwa's Awakening (Demo).nes", System: "nes"} + sushi = games.GameMetadata{Name: "Sushi The Cat", Type: "gba", Path: "gba/Sushi The Cat.gba", System: "gba"} + fd = games.GameMetadata{Name: "Florian Demo", Type: "n64", Path: "n64/Sample Demo by Florian (PD).z64", System: "n64"} ) func TestMain(m *testing.M) {