mirror of
https://github.com/Abdess/retroarch_system.git
synced 2026-10-23 20:29:06 -05:00
fix: add flycast standalone data directory paths
The standalone build reads BIOS files from its data directory root, not from dc/ (core/oslib/oslib.cpp:118-196, core/stdclass.cpp:95-125, core/linux-dist/main.cpp:74-99). Each entry now carries standalone_path.
This commit is contained in:
1 parent
3ca746478d
commit
eb04fb50cc
3 files changed
+54
-1
No files matched your search
@@ -0,0 +1,31 @@
|
||||
"""Flycast's two builds read the same files from two directories.
|
||||
|
||||
The libretro port looks in <system>/dc/ (shell/libretro/libretro.cpp:2249-2250).
|
||||
The standalone emulator looks in its data directory, whose root holds the
|
||||
files with no dc/ level (core/oslib/oslib.cpp:118-196, core/stdclass.cpp:95-125).
|
||||
Without standalone_path the standalone layout of a pack fell back on path:
|
||||
and put every file one directory too deep.
|
||||
"""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
import unittest
|
||||
from pathlib import Path
|
||||
|
||||
import yaml
|
||||
|
||||
PROFILE = Path(__file__).resolve().parent.parent / "emulators" / "flycast.yml"
|
||||
|
||||
|
||||
class FlycastStandaloneLayout(unittest.TestCase):
|
||||
def test_every_entry_has_the_data_directory_layout(self) -> None:
|
||||
profile = yaml.safe_load(PROFILE.read_text(encoding="utf-8"))
|
||||
self.assertEqual(profile["type"], "standalone + libretro")
|
||||
for entry in profile["files"]:
|
||||
with self.subTest(entry=entry["name"]):
|
||||
self.assertTrue(entry["path"].startswith("dc/"))
|
||||
self.assertEqual(entry.get("standalone_path"), entry["path"][len("dc/"):])
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
unittest.main()
|
||||
Reference in new issue
Block a user