mirror of
https://github.com/Abdess/retroarch_system.git
synced 2026-04-14 04:42:32 -05:00
refactor: registry merge uses exclusion list instead of hardcoded fields
This commit is contained in:
@@ -215,11 +215,16 @@ def load_platform_config(platform_name: str, platforms_dir: str = "platforms") -
|
|||||||
elif isinstance(reg_cores, list) and cfg_cores is None:
|
elif isinstance(reg_cores, list) and cfg_cores is None:
|
||||||
config["cores"] = reg_cores
|
config["cores"] = reg_cores
|
||||||
|
|
||||||
# Merge other metadata: registry supplements missing fields
|
# Merge all registry fields not already in config.
|
||||||
for field in ("hash_type", "verification_mode", "base_destination",
|
# Skip registry-only metadata (not relevant to platform config).
|
||||||
"case_insensitive_fs", "standalone_cores"):
|
_REGISTRY_ONLY = {
|
||||||
if field in reg_entry and field not in config:
|
"config", "status", "logo", "scraper", "source_url",
|
||||||
config[field] = reg_entry[field]
|
"source_format", "schedule", "target_scraper", "target_source",
|
||||||
|
"inherits_from", "install", "cores", # cores handled above
|
||||||
|
}
|
||||||
|
for key, val in reg_entry.items():
|
||||||
|
if key not in _REGISTRY_ONLY and key not in config:
|
||||||
|
config[key] = val
|
||||||
|
|
||||||
_platform_config_cache[cache_key] = config
|
_platform_config_cache[cache_key] = config
|
||||||
return config
|
return config
|
||||||
|
|||||||
Reference in New Issue
Block a user