Skip to content

validation rollup: safe compat splits from PR 169 - #192

Draft
mstan wants to merge 4 commits into
masterfrom
validation/pr169-input-window-rollup
Draft

validation rollup: safe compat splits from PR 169#192
mstan wants to merge 4 commits into
masterfrom
validation/pr169-input-window-rollup

Conversation

@mstan

@mstan mstan commented Aug 23, 2026

Copy link
Copy Markdown
Owner

Draft validation rollup for user suite testing. Split from original PR #169 by tetrisgm; original PR intentionally left open.

Includes these already-open split PRs:

Explicitly removed:

Intent:

  • Provide one build target for regression validation across the user's title suite.
  • Keep review/merge decisions available at the smaller PR level.

Validation:

  • git diff --check origin/master...HEAD
  • python runtime/tests/test_savestate_status_protocol.py
  • ctest --test-dir build\split-runtime -R savestate_status_protocol_test --output-on-failure
  • cmake --build build\split-recompiler --target psxrecomp-toml
  • cmake --build build\split-runtime --target sio_dualshock_rumble_test psx-runtime

Notes:

  • This rollup should not be merged in addition to the individual split PRs. Use it either as a test vehicle, or merge it instead of the three smaller PRs if that is the preferred integration path.
  • Build warnings observed here match the existing runtime warnings seen on the individual splits.

[hotkeys] rewind_pad / save_state_menu_pad accept the recomp-ui pad encoding,
where 1000 + a button bitmask is a CHORD. The parse guarded on `n < 256`,
which admits single buttons and rejects every chord there is — including the
two values this same file writes back out (1272 = select+r3, 2040 =
select+r1). A saved chord was silently dropped on load and the defaults
quietly reinstated, so the pad hotkeys were never actually configurable.

The bound predates the chord encoding; the runtime's own
normalize_hotkey_pad_binding has handled combos correctly all along.

Replaced with pad_bind_value_ok(), sharing one documented bound with the
encoding it validates. Verified against a live boot with rewind_pad = 1017
(select+cross): parsed has=0 value=1272 before, has=1 value=1017 after.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
(cherry picked from commit 165fae0)
@mstan mstan changed the title validation rollup: input and window splits from PR 169 validation rollup: safe compat splits from PR 169 Aug 23, 2026
tetrisgm and others added 3 commits August 23, 2026 16:57
Without it Windows virtualises everything the process sees. On a 7680x4320
panel at 400% scaling SDL_GetDisplayUsableBounds reports 1920x1032, so
clamp_window_aspect fits the window to roughly 1376 LOGICAL pixels and it opens
as a small box that the desktop compositor then upscales.

The internal render resolution is unaffected, which is what makes this
expensive rather than cosmetic: the game renders at supersampling 16 and the
result is thrown away scaling a 1376-wide window up to an 8K display. Choosing a
high internal resolution and getting a small blurry window is the exact opposite
of the intent.

permonitorv2 makes SDL report physical pixels, so the window sizes against the
real panel and the drawable matches it 1:1. Set before both SDL_Init call sites,
guarded on the hints existing so it builds against older SDL.

Also changes g_video_win_w's default from a hardcoded 1280 to 0, meaning "fit
the display", clamped to the usable bounds and the configured aspect. An
explicit width still wins. 1280 was a reasonable default when a window was a
window; it is not one on a 4K or 8K panel.

Diagnosed after reporting the display as 1920x1080 from a non-DPI-aware query
and telling the user their panel could not be larger. It is 7680x4320; the
measurement was virtualised, not the display.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
(cherry picked from commit 236778e)
clamp_window_aspect fits the CLIENT area to the usable bounds, but a window is
client plus title bar and borders. On a display whose usable height it exactly
matched, the result was a window taller than the screen: client 5504x4128,
window 5550x4263, positioned at y = -112 and hanging off the top.

Deriving the decoration size first does not work either. SDL_GetWindowBordersSize
reports nothing useful before the window has been shown, so a post-creation
correction based on it silently did not apply -- the window stayed exactly as
wrong, which is worse than not trying.

The window manager already solves this exactly, so ask it: SDL_MaximizeWindow
fits the work area with decorations and taskbar included. Measured on a
7680x4320 panel, client area is now 7680x4039 against 5504x4128 before.

Only when the width was not explicitly chosen -- an explicit window_width is a
deliberate decision and is left alone.

Suggested by the user after two failed attempts at doing the arithmetic here.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
(cherry picked from commit d6d0946)
@mstan
mstan force-pushed the validation/pr169-input-window-rollup branch from b4bc498 to 3a5939a Compare August 23, 2026 23:58
@mstan

mstan commented Aug 23, 2026

Copy link
Copy Markdown
Owner Author

Updated after review: removed #179 ape-card-unstick from this validation rollup. #179 is now closed/rejected because Ape/card correctness cannot be handled through a per-title config/env gate.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants