mirror of
https://github.com/Abdess/retroarch_system.git
synced 2026-11-29 21:08:53 -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
@@ -10,7 +10,7 @@ from core.cli import suggest_names
|
||||
from core.paths import sanitize_pack_path
|
||||
from model.declarations import declared_slot
|
||||
from model.platforms import load_platform_config
|
||||
from model.profiles import preferred_profile, upstream_profile_index
|
||||
from model.profiles import preferred_profile, profile_names, upstream_profile_index
|
||||
from model.systems import norm_system_id, select_systems
|
||||
from model.targets import list_available_targets, load_target_config
|
||||
from core.paths import REPO_ROOT
|
||||
@@ -110,11 +110,11 @@ def _platform_profiles(
|
||||
def replaced_by_own(name: str, p: dict, libretro_only: bool = False) -> bool:
|
||||
if platform_key in (p.get("built_by") or []):
|
||||
return False
|
||||
names = {name, *(str(c) for c in p.get("cores") or [])}
|
||||
names = set(profile_names(name, p))
|
||||
return any(
|
||||
(not libretro_only or "libretro" in str(q.get("type", "")))
|
||||
and q.get("source") == p.get("source")
|
||||
and names & {key, *(str(c) for c in q.get("cores") or [])}
|
||||
and names.intersection(profile_names(key, q))
|
||||
for key, q in own_builds.items()
|
||||
)
|
||||
|
||||
|
||||
Reference in new issue
Block a user