fix: offer only the core slots romfs2 reads

systemholder.py builds core.0 to core.19. The Recalbox platform core
list took any core.N section, so a later slot would have been offered
by the platform while no board builds it.
This commit is contained in:
Abdessamad Derraz committed 2026-11-22 00:58:05 +01:00
1 parent 5028318e3d
commit 501b2a84f3
3 files changed
+23 -10

No files matched your search

+3 -10
View File
@@ -155,13 +155,10 @@ def _core_names(values: dict[str, str]) -> tuple[set[str], set[str]]:
def system_ini_libretro(text: str) -> set[str]:
"""The libretro cores one Recalbox system.ini offers."""
import re
return {
values.get("core", "")
for section, values in read_system_ini(text).sections.items()
if re.fullmatch(r"core\.\d+(\.[\w-]+)?", section)
and values.get("emulator") == "libretro" and values.get("core")
for values in read_system_ini(text).core_sections()
if values.get("emulator") == "libretro" and values.get("core")
}
@@ -196,13 +193,9 @@ def system_ini_cores(text: str) -> tuple[set[str], set[str]]:
or a standalone emulator. es_bios.xml only names the cores that need a
BIOS, so read alone it left most of Recalbox's cores outside the pack.
"""
import re
cores: set[str] = set()
standalone: set[str] = set()
for section, values in read_system_ini(text).sections.items():
if not re.fullmatch(r"core\.\d+(\.[\w-]+)?", section):
continue
for values in read_system_ini(text).core_sections():
found, alone = _core_names(values)
cores |= found
standalone |= alone