Files
psxrecomp/runtime
Matthew Stanley 53fee8fbd6 recomp-ui launcher: wire pad-mode + aspect-ratio capabilities
Extends the RECOMP_LAUNCHER block in runtime/src/main.cpp to pass the
new RecompLauncherCSettings.pad_mode[2]/aspect_index and
RecompLauncherCGameInfo.pad_mode_supported/pad_mode_selectable/
allow_hybrid/locked_pad_mode/lock_device/aspect_mask fields, sourced
from the same GameConfig-derived locals (ctrl_lock_mode,
ctrl_allow_hybrid, ctrl_lock_device, p1_mode, ws_offered,
ws_ultrawide_offered) the existing RmlUi launcher path already uses.

- ls.pad_mode[0/1] seeded from seed.p1_mode/p2_mode; ls.aspect_index
  derived from seed.aspect_num/aspect_den (4:3/16:9/21:9).
- gi.pad_mode_supported = 1 (PSX always has pad modes);
  gi.pad_mode_selectable = !ctrl_lock_mode; gi.allow_hybrid =
  ctrl_allow_hybrid; gi.locked_pad_mode = p1_mode; gi.lock_device =
  ctrl_lock_device; gi.aspect_mask = 0x1 | (ws_offered<<1) |
  (ws_ultrawide_offered<<2).
- On LAUNCH, ls.pad_mode[]/aspect_index are copied back into
  seed.p1_mode/p2_mode/aspect_num/aspect_den so the launcher's choice
  persists to settings.toml exactly like the RmlUi path.

Verified against the real Ape Escape game.toml: aspect_mask=0x7
(4:3+16:9+21:9, offer_ultrawide=true) and pad_mode=[1,1] (analog,
matching default_mode="analog") both flow through correctly. The pad-
mode selector itself renders hidden/locked to Analog in the built
launcher, because Ape Escape's [controller] block sets lock_mode =
true (intentional: it's a dual-analog-only title) -- gi.pad_mode_selectable
correctly evaluates to 0 for this game, same as the RmlUi path's
ginfo.lock_mode already did.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-16 11:25:25 -07:00
..