feat: profile the Batocera and Recalbox LRPS2

Batocera 43.1 builds libretro/ps2 at 416291a with 001.bios-dir.patch and
Recalbox 10.1.1 builds it at 9485a53 with 0001-recalbox-paths.patch. Both
patches move the BIOS scan from pcsx2/bios to ps2, and Recalbox also moves
the data root to system/ps2. Each build gets its own built_by profile:
lrps2-416291a under Batocera's pcsx2 name, lrps2-9485a53 under Recalbox's
ps2 name.

A platform's own build now answers for its own build mode only on a
dual_mode_cores name, so Batocera keeps standalone PCSX2 beside its
libretro build.
This commit is contained in:
Abdessamad Derraz committed 2026-11-10 11:38:03 +01:00
1 parent d457948143
commit 7cb0e67eb6
5 files changed
+371 -4

No files matched your search

+19 -3
View File
@@ -3308,6 +3308,11 @@ def _platform_profiles(
}
index = upstream_profile_index(profiles)
platform = str(config.get("_key") or "")
dual_names = {str(c) for c in config.get("dual_mode_cores") or []}
def build_modes(p: dict) -> set[str]:
kind = str(p.get("type", ""))
return {mode for mode in ("standalone", "libretro") if mode in kind}
def designated(name: str) -> set[str]:
# A build the platform compiles itself (built_by) is what its
@@ -3319,10 +3324,21 @@ def _platform_profiles(
p for p in index.get(name, ())
if platform and platform in (profiles[p].get("built_by") or [])
}
if own:
return own
preferred = preferred_profile(index, name)
return {preferred} if preferred is not None else set()
if not own:
return {preferred} if preferred is not None else set()
# The own builds stand for the modes they are built in only.
# Batocera builds LRPS2 as pcsx2_libretro.so and launches
# standalone PCSX2 under the same name.
own_modes = set().union(*(build_modes(profiles[p]) for p in own))
if (
name in dual_names
and preferred is not None
and preferred not in own
and not build_modes(profiles[preferred]) & own_modes
):
own.add(preferred)
return own
result = {profile for c in core_set for profile in designated(c)}
# A name the platform launches both ways designates its libretro