mirror of
https://github.com/Abdess/retroarch_system.git
synced 2026-10-17 08:53:28 -05:00
fix: rank slots with the platform's own cores
This commit is contained in:
1 parent
820d544d7d
commit
5c969a3651
3 files changed
+46
-1
No files matched your search
@@ -490,7 +490,8 @@ def _select_variants(
|
||||
for sys_id, members in region_groups.items()
|
||||
}
|
||||
slot_drops, slot_undecidable = slot_mod.resolve_slot_drops(
|
||||
slot_groups, slot_mod.build_slot_index(emu_profiles or {})
|
||||
slot_groups,
|
||||
slot_mod.platform_slot_index(config, emu_profiles or {}, target_cores),
|
||||
)
|
||||
region_drops = region_drops | slot_drops
|
||||
if slot_undecidable:
|
||||
|
||||
@@ -30,6 +30,21 @@ from __future__ import annotations
|
||||
BIOS_CATEGORY = "bios"
|
||||
|
||||
|
||||
def platform_slot_index(
|
||||
config: dict, profiles: dict, target_cores: set[str] | None = None
|
||||
) -> dict[str, dict]:
|
||||
"""The slot index of the emulators a platform runs, nothing else.
|
||||
|
||||
Built over every profile, DuckStation, ePSXe and Rustation ranked the
|
||||
PlayStation BIOS of RomM, whose cores rank none of them, and
|
||||
`--one-per-slot` dropped four images RomM declares.
|
||||
"""
|
||||
from common import resolve_platform_cores # noqa: PLC0415
|
||||
|
||||
cores = resolve_platform_cores(config, profiles, target_cores=target_cores)
|
||||
return build_slot_index({n: profiles[n] for n in cores if n in profiles})
|
||||
|
||||
|
||||
def build_slot_index(profiles: dict) -> dict[str, dict]:
|
||||
"""Map a file key to its slot metadata, keyed by path then name."""
|
||||
index: dict[str, dict] = {}
|
||||
|
||||
Reference in new issue
Block a user