mirror of
https://github.com/Abdess/retroarch_system.git
synced 2026-10-10 13:33:24 -05:00
fix: read hle fallbacks from the platform cores only
This commit is contained in:
1 parent
62bae63bbf
commit
3067865b02
2 files changed
+16
-11
No files matched your search
+8
-9
@@ -752,20 +752,19 @@ def verify_platform(
|
|||||||
if emu_profiles is not None
|
if emu_profiles is not None
|
||||||
else load_emulator_profiles(emulators_dir)
|
else load_emulator_profiles(emulators_dir)
|
||||||
)
|
)
|
||||||
hle_index: dict[str, bool] = {}
|
|
||||||
for profile in profiles.values():
|
|
||||||
for f in profile.get("files", []):
|
|
||||||
if f.get("hle_fallback"):
|
|
||||||
hle_index[f.get("name", "")] = True
|
|
||||||
# Ground truth comes from the emulators the platform runs. A standalone
|
# Ground truth comes from the emulators the platform runs. A standalone
|
||||||
# profile that loads a same-named file of its own (ZEsarUX's 48K
|
# profile that loads a same-named file of its own (ZEsarUX's 48K
|
||||||
# cpc6128.rom against cap32's 32K one) has nothing to say about a
|
# cpc6128.rom against cap32's 32K one) has nothing to say about a
|
||||||
# RetroArch pack.
|
# RetroArch pack, nor does its HLE: dosbox-x's FONT.ROM fallback turned a
|
||||||
|
# missing required Batocera BIOS into INFO.
|
||||||
plat_cores = resolve_platform_cores(config, profiles)
|
plat_cores = resolve_platform_cores(config, profiles)
|
||||||
platform_profiles = {name: profiles[name] for name in plat_cores}
|
platform_profiles = {name: profiles[name] for name in plat_cores}
|
||||||
validation_index = _build_validation_index(
|
hle_index: dict[str, bool] = {}
|
||||||
{name: profiles[name] for name in plat_cores}
|
for profile in platform_profiles.values():
|
||||||
)
|
for f in profile.get("files", []):
|
||||||
|
if f.get("hle_fallback"):
|
||||||
|
hle_index[f.get("name", "")] = True
|
||||||
|
validation_index = _build_validation_index(platform_profiles)
|
||||||
|
|
||||||
# Filter systems by target
|
# Filter systems by target
|
||||||
if not target_cores:
|
if not target_cores:
|
||||||
|
|||||||
@@ -29,9 +29,9 @@ class ValidationIndexScope(unittest.TestCase):
|
|||||||
self.assertRegex(
|
self.assertRegex(
|
||||||
verify,
|
verify,
|
||||||
r"plat_cores = resolve_platform_cores\(config, profiles\)\s+"
|
r"plat_cores = resolve_platform_cores\(config, profiles\)\s+"
|
||||||
r"validation_index = _build_validation_index\(\s*"
|
r"platform_profiles = \{name: profiles\[name\] for name in plat_cores\}",
|
||||||
r"\{name: profiles\[name\] for name in plat_cores\}",
|
|
||||||
)
|
)
|
||||||
|
self.assertIn("validation_index = _build_validation_index(platform_profiles)", verify)
|
||||||
self.assertRegex(
|
self.assertRegex(
|
||||||
builder,
|
builder,
|
||||||
r"for name in resolve_platform_cores\(config, emu_profiles\)\s*\}\s*"
|
r"for name in resolve_platform_cores\(config, emu_profiles\)\s*\}\s*"
|
||||||
@@ -39,5 +39,11 @@ class ValidationIndexScope(unittest.TestCase):
|
|||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
class HleIndexScope(unittest.TestCase):
|
||||||
|
def test_hle_index_reads_the_platform_cores(self):
|
||||||
|
verify = (REPO_ROOT / "scripts" / "verify.py").read_text(encoding="utf-8")
|
||||||
|
start = verify.index("hle_index: dict[str, bool] = {}")
|
||||||
|
self.assertIn("for profile in platform_profiles.values():", verify[start:start + 200])
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
unittest.main()
|
unittest.main()
|
||||||
Reference in new issue
Block a user