fix: suggest the closest system for --platform

--platform retroarch --system sony-playstaton listed the first ten systems
of the alphabet. The warning now names the closest systems and the
command that lists the platform's own, as --system alone already did.
This commit is contained in:
Abdessamad Derraz committed 2026-10-21 05:19:27 +02:00
1 parent 959934d43c
commit bc68e517cb
2 files changed
+29 -3

No files matched your search

+7 -3
View File
@@ -769,10 +769,14 @@ def generate_pack(
if sid in system_filter or _norm_system_id(sid) in norm_filter
}
if not filtered:
available = sorted(pack_systems.keys())[:10]
hint = suggest_names(
system_filter,
sorted(pack_systems),
f"--platform {platform_name} --list-systems",
)
print(
f" WARNING: no systems matched filter {system_filter} "
f"(available: {', '.join(available)})"
f" WARNING: {platform_name} has no system matching "
f"{', '.join(system_filter)}. {hint}"
)
return None
pack_systems = filtered