Files
psxrecomp/runtime/src
Matthew Stanley 647b81752f runtime: tri-state fullscreen (windowed/borderless/exclusive)
The shared recomp-ui launcher already exposes fullscreen as a universal
tri-state (RecompLauncherCSettings.fullscreen: 0 off / 1 borderless /
2 exclusive), but the PSX runtime collapsed it to a bool everywhere and
only ever used SDL_WINDOW_FULLSCREEN_DESKTOP. Widen the runtime to carry
the full tri-state end to end, matching the SNES/Genesis engines:

- config_loader: UserSettings::fullscreen is now int (0/1/2) instead of
  bool. settings.toml persists it as a bare int; loading still accepts
  the old bool form (true -> 1) for back-compat with settings.toml files
  written before this change, then clamps to [0,2].
- main.cpp: removed every `!= 0` / `? 1 : 0` collapse between
  UserSettings, the seed struct, and RecompLauncherCSettings, so 0/1/2
  round-trips unchanged through the launcher and back into settings.toml.
- main.cpp: win_flags now maps 2 -> SDL_WINDOW_FULLSCREEN (exclusive
  mode change) and 1 -> SDL_WINDOW_FULLSCREEN_DESKTOP (borderless), via
  a small psx_fullscreen_flag_for_mode() helper shared with the hotkey.
- main.cpp: the Alt+Enter / Cmd+Ctrl+F hotkey now detects "currently
  fullscreen" by testing the SDL_WINDOW_FULLSCREEN bit (set in both
  SDL_WINDOW_FULLSCREEN and SDL_WINDOW_FULLSCREEN_DESKTOP) instead of
  only the DESKTOP flag, and toggles between windowed and the
  CONFIGURED tri-state mode rather than hardcoding DESKTOP.
- launcher.cpp/launcher.rml (the legacy RmlUi launcher, still built
  whenever PSX_LAUNCHER is on): fullscreen is now a 3-way cycle button
  (Off/Borderless/Exclusive) following the same cycle_*/*_label pattern
  as the existing CRT/texture-filter controls, instead of an On/Off
  toggle.

Validated with g++ -fsyntax-only (mingw64) against config_loader.cpp
standalone, and main.cpp with no launcher flags, PSX_LAUNCHER only,
RECOMP_LAUNCHER only (against the real recomp-ui RecompLauncherCSettings
header), and both together - all clean. launcher.cpp (RmlUi) was
reviewed by exact pattern-match against the file's existing cycle_crt/
crt_label code (lib/RmlUi isn't checked out in this worktree, so it
could not be compiled).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-20 22:34:58 -07:00
..
2026-07-17 03:54:27 -05:00
2026-07-14 18:56:51 -07:00