mirror of
https://github.com/Abdess/retroarch_system.git
synced 2026-10-30 15:47:20 -05:00
fix: let taiwan and asia-ntsc answer each other
kronos tags the ST-V BIOS epr-19854.ic8 taiwan, mednafen_stv tags it asia-ntsc, the SMPC area Mednafen names for Taiwan (ss.cpp:1119, 2363-2364). As siblings under asia they never matched, so a request in one spelling dropped the file tagged in the other, and --region taiwan,us dropped the Saturn sega_101.bin. AREA_TERRITORIES relates each area to the territory it serves, china for asia-pal included, in region.py and its installer copy.
This commit is contained in:
1 parent
e318bb4503
commit
7bcd41e0c4
7 files changed
+56
-8
No files matched your search
+11
-1
@@ -137,6 +137,10 @@ REGION_ALIASES: dict[str, str] = {
|
||||
"auto": WORLD_REGION,
|
||||
"gb": "uk",
|
||||
}
|
||||
AREA_TERRITORIES: dict[str, frozenset] = {
|
||||
"asia-ntsc": frozenset({"taiwan"}),
|
||||
"asia-pal": frozenset({"china"}),
|
||||
}
|
||||
_REGION_PARENT = {
|
||||
member: parent for parent, members in REGION_TREE.items() for member in members
|
||||
}
|
||||
@@ -2116,7 +2120,13 @@ def canonical_region(raw: str) -> str:
|
||||
|
||||
|
||||
def _region_comparable(a: str, b: str) -> bool:
|
||||
return a == b or _REGION_PARENT.get(a) == b or _REGION_PARENT.get(b) == a
|
||||
return (
|
||||
a == b
|
||||
or _REGION_PARENT.get(a) == b
|
||||
or _REGION_PARENT.get(b) == a
|
||||
or a in AREA_TERRITORIES.get(b, ())
|
||||
or b in AREA_TERRITORIES.get(a, ())
|
||||
)
|
||||
|
||||
|
||||
def _region_rank(file_regions: set[str], requested: list[str]) -> int:
|
||||
|
||||
Reference in new issue
Block a user