mirror of
https://github.com/Abdess/retroarch_system.git
synced 2026-11-28 12:28:51 -06:00
refactor: one list of the names a core goes by
model.profiles.profile_names(key, profile) gives a profile's key then
the names its cores: lists, and core_key moves there from contentlayout
with core_key_index, upstream_profile_index keyed by it. The inline
{key, *cores} sets and scans in resolve and packs read profile_names;
the two roms folder matchers read core_key_index. The parameter of
select_emulator_profiles is renamed requested.
Matching stays exact everywhere it was exact. Folding case and -/_
everywhere would merge distinct profiles: dosbox_pure (Batocera,
AmberELEC, EmuELEC) would also name dosbox-pure-unleashed, and
pcsx_rearmed would also name pcsx_rearmed_standalone (RetroPie's
pcsx-rearmed). Only roms folder rows (retrobat BSNES, Snes9x, mGBA,
emudeck vice-x64sc...) depend on the fold, and those already fold.
The alias lookup of select_emulator_profiles now compares string core
names, as every other reader does. No output change.
This commit is contained in:
1 parent
0095b23512
commit
48eb208786
10 files changed
+59
-38
No files matched your search
@@ -5,6 +5,8 @@ from __future__ import annotations
|
||||
import json
|
||||
from collections.abc import Iterable, Mapping
|
||||
|
||||
from model.profiles import profile_names
|
||||
|
||||
|
||||
|
||||
def runs_standalone(
|
||||
@@ -97,7 +99,7 @@ def core_system_dirs(
|
||||
]
|
||||
if not pairs:
|
||||
return None
|
||||
names = {emu_name, *(str(c) for c in profile.get("cores") or [])}
|
||||
names = set(profile_names(emu_name, profile))
|
||||
return sorted({directory for core, directory in pairs if core in names})
|
||||
|
||||
|
||||
@@ -239,7 +241,7 @@ def standalone_bindings_for(
|
||||
if not declared and not pools:
|
||||
return {}
|
||||
|
||||
names = {emu_name, *(str(c) for c in profile.get("cores") or [])}
|
||||
names = set(profile_names(emu_name, profile))
|
||||
layout = [
|
||||
path for f in profile.get("files") or []
|
||||
if isinstance(f, dict) and (path := standalone_layout_path(f, profile))
|
||||
|
||||
Reference in new issue
Block a user