mirror of
https://github.com/Abdess/retroarch_system.git
synced 2026-11-22 17:47:48 -06:00
refactor: load launcher platform configs once
This commit is contained in:
1 parent
6ba52a9682
commit
b28973440e
1 file changed
+6
-12
@@ -23,24 +23,18 @@ def launcher_rows(
|
||||
) -> tuple[list[dict], list[dict]]:
|
||||
"""The names a launcher reads that the collection lacks, and the
|
||||
launcher records nothing proves."""
|
||||
configs = {
|
||||
name: load_platform_config(name, platforms_dir)
|
||||
for name in (selected or list_registered_platforms(platforms_dir))
|
||||
}
|
||||
# Counted apart from the profile gaps: a name only a launcher reads is
|
||||
# reported, not yet judged.
|
||||
launcher_reads = launcher_reads_not_held(
|
||||
{
|
||||
name: load_platform_config(name, platforms_dir)
|
||||
for name in (selected or list_registered_platforms(platforms_dir))
|
||||
},
|
||||
db, all_profiles, registry, emulator or "",
|
||||
configs, db, all_profiles, registry, emulator or "",
|
||||
)
|
||||
|
||||
unproven = [
|
||||
row for row in launcher_unproven(
|
||||
{
|
||||
name: load_platform_config(name, platforms_dir)
|
||||
for name in (selected or list_registered_platforms(platforms_dir))
|
||||
},
|
||||
all_profiles,
|
||||
)
|
||||
row for row in launcher_unproven(configs, all_profiles)
|
||||
if not emulator or any(
|
||||
emulator in LauncherLayer._profiles_named(part, all_profiles, set(all_profiles))
|
||||
for part in row["emulator"].split(", ")
|
||||
|
||||
Reference in new issue
Block a user