fix #391: curated modern-only resolution list from the monitor's modes

User-directed (2026-08-13): "we should only support modern resolutions.
Not any old format." New DisplayModeCatalog enumerates the window's
monitor (Silk IMonitor.GetAllVideoModes) once at GameWindow load and
curates via a pure, tested rule: modern widescreen families only
(16:9/16:10/21:9/32:9 within 2.5%), at least 1280 wide, must fit the
desktop (an impossible windowed pick is not offered - the measured
3840x2160-on-2560x1440 silent clamp class), desktop mode always
included, refresh-rate duplicates collapsed, ascending order.

The Config Resolution row consumes the catalog through two new optional
Bind parameters; its Defaults value becomes the desktop's own mode.
Fixture/headless callers keep the static preset ladder, which now drops
800x600 and is pinned by test to pass the same curation rule (the OP6 S4
"default must be re-selectable" invariant holds on both paths).

Deliberate retail deviation, register row IA-22: retail listed the
adapter's complete enumeration including 4:3 legacy modes and authored
800x600 as the Config default (gmConfigUI::InitOptions
SetDefaultValue(0x03200258); gmClient::Init @0x004047af). The catalog is
also the designated fullscreen mode-switch validation source for
#376/#388 - an offered mode is supported by construction.

Tests: DisplayModeCatalogTests (8 - filter/clamp/dedupe/sort/ultrawide/
desktop-inclusion/fallback-consistency); ConfigOptionsPageControllerTests
row-12 default updated. App suite 4,961/3 skips; UI.Abstractions 916.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
Erik 2026-08-13 17:16:09 +02:00
parent 7e0c130344
commit 13d388e5a9
9 changed files with 324 additions and 23 deletions

View file

@ -26,7 +26,21 @@ What does NOT go here:
## #391 — Resolution list: offer only modern modes from the monitor's real mode list (user-directed curation)
**Status:** OPEN — filed 2026-08-13, user-directed ("we should only
**Status:** DONE 2026-08-13 (this commit) — display block slice 2, pending
the user's gate. `DisplayModeCatalog` (App/Rendering) enumerates the
window's monitor via Silk (`IMonitor.GetAllVideoModes`), curates through
the pure `Curate` rule (modern families 16:9/16:10/21:9/32:9 ±2.5%,
≥1280 wide, fits the desktop, desktop mode always included, refresh-rate
duplicates collapsed, ascending), and is installed once at `GameWindow`
load. The Config Resolution row takes the curated list + the desktop-mode
Defaults value through two new optional `Bind` parameters; fixture
callers keep the static ladder (800x600 now removed from it — the ladder
itself passes the curation rule, pinned by test). Register row IA-22
carries the deliberate deviation (retail listed every adapter mode and
authored 800x600 as the default). The same catalog is the designated
mode-validation source for #376/#388. Original filing below.
**Original filing:** OPEN — filed 2026-08-13, user-directed ("we should only
support modern resolutions. Not any old format"). Today's Resolution
dropdown offers a list that includes legacy 4:3 modes (800x600 was
pickable) and modes the desktop cannot host (3840x2160 on a 2560x1440