feat(graphics): choose the monitor used for fullscreen #1277
No reviewers
Labels
No labels
area/accessibility
area/audio
area/input
area/install
area/menu
area/renderer
area/saves
area/tooling
area/upscaling
beanstalk: approved
beanstalk: failed
beanstalk: needs approval
beanstalk: running
beanstalk: tested
ci: approved
good first issue
gpu/amd
gpu/igpu
gpu/intel
gpu/nvidia
help wanted
kind
bug
kind
chore
kind
docs
kind
feature
kind
performance
kind
question
needs measurements
platform/linux
platform/macos
platform/steam-deck
platform/windows
preview
priority
critical
priority
high
priority
low
regression
risk
high
risk
low
risk
medium
status
blocked
status
confirmed
status
duplicate
status
invalid
status
needs-info
status
wontfix
ci: approved
No milestone
No project
No assignees
3 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
MagicBeanDev/Longshot!1277
Loading…
Reference in a new issue
No description provided.
Delete branch "Phishinabowl/Longshot:feat/fullscreen-monitor-selector"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Type: feat · Risk: medium · Tested on: Windows 10, RTX 3080 (four displays); Ubuntu 26.04.1 Wayland, RTX 5090 Laptop GPU (one display); rebased native fixtures on both · Needs: Linux SDL2 multi-display retarget confirmation; other coverage limits below
Why
Players with multiple screens need to choose where Longshot enters fullscreen without changing their system's primary display. Add a saved monitor choice in the Graphics menu, with Auto preserving the current-screen behavior.
The tracker was searched for fullscreen and monitor work. No matching fullscreen monitor-selector PR was identified in the returned titles/descriptions. Related existing behavior: #176 selects a primary screen for Auto sizing before a window exists; this feature chooses the fullscreen destination. No issue is claimed fixed without a confirmed matching report.
What changed
Graphics → Screen gains a Fullscreen monitor selector. Choosing a screen while windowed sets the next fullscreen destination; choosing one while fullscreen requests an immediate move. Auto uses the current screen, and an unavailable choice is retained while a connected screen is used temporarily.
host/fullscreen_monitor.cand.hpublish copied metadata and queue saved identity preferences. Window operations remain on the host/window thread.host/display.ctargets the selected native monitor, restores saved window placement, and refreshes cursor clipping. Friendly labels come fromDisplayConfigGetDeviceInfo, matched by interface path, with the monitor-driver description as fallback.host/hos_sdl.candhost/posix/display_sdl.cuse existing SDL2/SDL3 display enumeration and fullscreen targeting. SDL2 retargeting leaves fullscreen before positioning/re-entry, because repeated identical fullscreen flags are a no-op. Original windowed placement survives transitions and failures. SDL already supplies friendly descriptions/model names; ambiguous identities are not offered as named choices.gpu/vk/vk_menu.cpp,menu_i18n.handmonitor_choice.himplement translated choices, unavailable labels and identity persistence. Native-size/mode information follows the observed display, including same-size display changes.gpu/vk/vk_api.hpreservesperf_info, upstreammain_thread_timesandout_of_memory, appends monitor enumeration/selection callbacks, and bumps the host/renderer ABI from 28 to 29. Backend initializer and compiled offset/slot checks match.Measurements
Verdict: the Auto-monitor rendering comparison is within observed repeat variation on both hosts. No performance improvement, regression or zero-cost claim is established by these runs. Functional selection checks passed on the scoped Windows and Linux setups.
PR head
c0dfffe730dddef169277794a0e5d79ac145026bis rebased onto mainf88e6e3a4a403cc75a150eae31bccd624d9a4842, with ABI 29. The three conflicts in the API header, backend initializer and audio interface test are resolved. Current affected native checks ran on this exact committed source. Assistance attribution is retained. The earlier runtime and eight measurement records retain their actual source snapshots.Record cleanup:
docs/tested/retains only the eight measured-run summaries added by this PR, as required by the contribution guide. Eleven ancillary functional, suite and rebase-history records were preserved in private evidence and removed from the diff. Their results remain summarized below. Regression tests, game code and the eight measured-run files are unchanged; this documentation cleanup required no rebuild or game interaction.The UI-only capture support, guide images/provenance and website catalogue integration do not change the measured game code. The normal catalogue failure is caused by multiple data rows in files whose format requires one row; those upstream records are preserved.
Measurement retention after rebase: the figures below remain evidence for their original instrumented
e335bd5cbase, not fresh FPS measurements of current main. The ABI reconciliation preserves slot order; SDL2's correction acts only during explicit named-display transitions, outside the measured steady Auto path. No steady Auto-path work was added by that fix. New upstream profiling/VRAM code can affect absolute FPS, so no current-base rate or zero-cost claim is inferred. Per the scoped validation decision, the rebase uses affected game-free checks without another game rebuild or performance run.Baseline: measurement builds use common Dev screenshot instrumentation in both columns: baseline
03ba344e82d77cabd2e8315cc11f416036034df4overe335bd5c(ABI 27) and monitor topic08b4a0a82648ce62fe76196975009fa034aab358(ABI 28). These are instrumented comparison binaries, separate from the pure PR source. Both revisions built, passed static inspection and completed normal shader/pipeline preparation on both hosts.Repeat spreads: Windows 1.60 / 1.95 FPS, Linux 0.35 / 0.60 FPS (main / monitor). The differences, -0.99% and +0.38%, are smaller than those spreads; per-variant ranges overlap. Each measured process reports zero in-play compilations, no known compilation/error markers and a closing census. All twelve warmup/measured sessions closed normally, with no forced termination. Dev captures were acknowledged at each host's output dimensions and the hardware footer was visually reviewed. These are logged native-FPS medians, not p95/p99 frametimes or screenshot-counter readings.
Completed-run output (native-FPS intervals bounded by each recorded start/end frame; warmup and capture excluded):
Selected raw retained timed-window log lines, Windows main-01 then topic-01; all retained intervals, rather than these two examples, supply the medians:
Hardware: Windows 10, RTX 3080, Vulkan-reported driver 0x9b460000, Ryzen 9 5900XT, 64 GB; Ubuntu 26.04.1 Wayland, RTX 5090 Laptop GPU, recorded NVIDIA driver 595.99.02, Core Ultra 9 275HX, about 61 GB.
Scene: stationary child Kakariko, matching frozen save, position and camera. Auto monitor selects the same physical screen for both variants. Output/window 2560x1440 on Windows and 2560x1600 on Linux; SDR fullscreen, FG Off, Auto (this PC) preset, game's own upscaler, configured 100% render resolution, VSync Auto, HOS_FPS_MAX=1000 overriding the menu's console-60 cap. Actual guest render-target dimensions were not independently established; Linux screen/compositor coordinates are not the output-window dimensions. The Windows High performance and Linux balanced/AC power profiles remained unchanged.
Method: two 45-second warmups, then 60-second main/topic/main/topic samples through the native control bridge and timing job queue, using independent copied data/INIs. Fast scene readiness replaces fixed menu sleeps. Breakdown is used consistently during timing; Dev PNG capture occurs afterward, outside timing. Build/preparation durations and screenshot counter values are not the measurements.
How to reproduce: use identically instrumented main/topic packs on one base, independent prepared host-local runtimes, one frozen child-Kakariko save and the stated settings; verify matching scene/output and FG Off, warm both variants, then run two interleaved 60-second pairs. Retain frame-bounded native-FPS log intervals, zero-compilation census, scene/options and normal-shutdown receipts. For functional behavior, choose Auto or a named monitor in Graphics → Screen, enter/exit fullscreen, and choose another monitor while fullscreen.
Baseline: historical full-suite and game-build evidence used the uncommitted feature over
ac778751, with full-suite controls against main623a0ca3. Complete later suites used17394b71. Measurements used the disclosed e335bd5c-based instrumentation, while current affected checks use clean exactf88e6e3acontrols. Captions retain the actual measured/captured inputs; they are not relabeled as the current ABI-29 PR head.Historical pre-commit functional comparison (not a current performance result):
623a0ca3(historical control)ac778751Flags and settings
One visible selector and two saved settings keys are added; no new environment switch or build flag is introduced.
Testing
Tested:
Latest rebase source
c0dfffe7on exact mainf88e6e3a: 46 affected monitor/menu/audio/ABI/allocation/guide checks selected. Windows 37 pass / 7 fail, with two declared POSIX exclusions; laptop Linux 41 pass / 5 fail. All failures reproduce on exact main with matching primary diagnostics; no branch-only failure. Shared failures:test_display_startup_failure.py(profiling stand-in absent),test_framegen_preset.py,test_rumble_menu.pyandtest_upscaler_round_trip.py(missing frame-generation stand-in), andtest_hud_layout_row.py(placing fixture). Windows additionally:test_perf_report.py(reconnect) andtest_recorder_sync.py(exit fixture missing upstreamvk_new.h); both pass on Linux. Controls: Windows 0 pass/7 fail, Linux 2 pass/5 fail. Source hashes remained unchanged. These are affected selections, not full suites or game builds.ABI-29 compiled callback offsets/initializer order, monitor policy/platform/friendly names, audio output/recovery/Mono, mic controls and upstream renderer allocation-handler checks pass on both platforms. Longshot guide source/asset checks and the 14 screenshot regressions pass. Preprocessing adds only
vk_new.h, with no removed dependency; the changed allocation/interface inputs do not alter the pictured controls. Original image/capture identities are retained; unchanged Launcher source reviews remain explicitly not checked. No game rebuild, shader preparation, launch, gameplay or fresh measurement was performed for this rebase.Current rebase/fix source
0aa01320on main8e9cfc3a: 60 affected monitor/menu/audio/profiling checks selected. Windows 50 pass / 8 fail, with two declared POSIX exclusions; laptop Linux 53 pass / 7 fail. Every failure reproduces on exact clean main with matching primary diagnostics; no branch-only failure. Shared failures aretest_display_startup_failure.py(new profiling stand-in absent),test_framegen_preset.py,test_hud_layout_row.py,test_rumble_menu.py,test_slow_frames.py(ambiguous source-cut marker),test_target_image_pool.py(old pool expectations) andtest_upscaler_round_trip.py; Windows additionallytest_perf_report.py(reconnect). These are affected selections, not another full-suite run.ABI/header/backend slot alignment, compiled offsets, monitor policy/naming/placement, audio output and microphone fixtures pass on both hosts. Independent read-only code review found SDL2's unchanged-flags retarget no-op; the corrected regression failed before the fix and passes after it, including failed leave, failed re-entry/retry and restoration with changing observed positions. Static follow-up found no remaining concrete blocker; that is not new physical-display runtime proof.
Independent format review checked template structure, settings, captions, prior evidence and remaining gates. Raw retained FPS excerpts were added, stale ABI/head/conflict prose was refreshed, and unrelated data failures/backend-matrix suggestions are distinguished from actual acceptance requirements. Source/asset review and all 14 guide-image tests pass after rebase; no new capture or website layout run is claimed.
Full Windows and Linux native host/renderer builds, static module inspection and Most shader preparation. Paired module hashes verified; normal cache validation retained.
Windows: four connected monitors display Acer UT220HQL, Dell U2414H, Dell SE2426HGS and AORUS FI27Q-P. The owner confirmed correct names and fullscreen targeting. Updated naming binaries reused prepared caches; final log scan found no tagged shader/Vulkan/device-loss/display-transition errors.
Linux: the owner confirmed Auto/named selection and entering/exiting fullscreen on the laptop's single-display Wayland setup. Startup/preparation logs were checked; this is not multi-display evidence.
Monitor menu/platform fixtures passed on both hosts in the earlier suite work. New Windows naming and SDL2/3 naming fixtures pass on both hosts. The Windows helper also compiles against real Windows headers. The friendly-name regression fails on the exact pre-fix monitor source, not on upstream main.
Historical full suites against
623a0ca3: Windows initially 612 pass/39 fail/44 skip; Linux 646 pass/32 fail/17 skip. All failures received main controls. Selector fixture corrections passed 21 applicable Windows and 23 Linux focused reruns. An unchanged Windows portable-setup failure passed its rerun. The remaining 29 Windows and 21 Linux failures also failed on that pinned main. These older results are superseded for current game-free readiness by the complete17394b71runs below; older native build/runtime acceptance remains separate.Test-record validation during drafting: all five new fragments pass direct format validation; the repository-fragment test passes. The 25-test documentation suite has one existing Windows ASCII-pipe CRLF/LF failure, already present in the historical main controls.
After replay onto
17394b71: Windows affected selection 30 pass/five failures, with two declared POSIX-only exclusions; Linux 33 pass/four failures. All applicable failures reproduce on clean matching main. Both platforms:test_framegen_preset.py,test_rumble_menu.pyandtest_upscaler_round_trip.pylack the frame-generation helper in their stand-ins;test_hud_layout_row.pyfails its placing fixture. Windows additionally fails the same reconnect scenario intest_perf_report.py. Monitor/naming/ABI/translation/atomic-settings/core audio checks pass. These controls supersede the older failure lists for the affected checks only.Subsequent full suites on
17394b71: Windows 626 pass / 37 fail / 45 skip, 433.71 s; Linux 663 pass / 28 fail / 17 skip, 374.32 s. All 37/28 failures reproduce on clean matching main. Two Tooling-discovery failures per platform pass topic/main when the existing path is supplied; the remaining 35 Windows and 26 Linux failures are named below. These are separate setup reruns, not replacement full-suite counts. No topic-only failure was found. All monitor/naming/ABI/audio/mic/translation checks passed.Current affected checks after bringing in the eight commits through
e335bd5c: Windows 45 pass / 5 fail, with two declared POSIX-only exclusions; Linux 48 pass / 4 fail. All applicable failures reproduce on cleane335bd5c. Shared failures:test_framegen_preset.py,test_hud_layout_row.py,test_rumble_menu.py,test_upscaler_round_trip.py; Windows additionallytest_perf_report.py. These are affected selections, not another full-suite run.Current measurement-only native packs: common capture main
03ba344eand monitor capture topic08b4a0a8both build, pass static inspection and complete Most preparation on Windows and laptop Linux. Both hosts completed two warmups and four interleaved timed samples, as detailed above. All owned sessions closed normally, every Dev capture was acknowledged, and frozen save/options inputs retained their recorded hashes. This does not establish expanded monitor edge-case runtime coverage.Historical complete-suite remaining shared failures against main
17394b71, undertests/(after the two successful Tooling-path reruns; currente335bd5caffected failures are named separately above):test_bug_report_defaults.py,test_crt_options.py,test_damage_debug_menu.py,test_dlss_feature_size.py,test_failed_compile_keeps_objects.py,test_framegen_preset.py,test_fsr_uniform_ownership.py,test_guest_imported.py,test_hud_layout_row.py,test_import_reach.py,test_linux_preflight.py,test_make_game_cache.py,test_missing_nup.py,test_parallel_init_order.py,test_pending_guest_import.py,test_pipeline_play_cache.py,test_replay_write_order.py,test_rumble_menu.py,test_run_all_changed.py,test_upscaler_round_trip.py,test_upscaler_rows.py,test_vk_occlusion_queries.py,test_walk_key.py.test_auto_handheld.py,test_crash_dialog.py,test_fastfp_fma.py,test_fpx_sticky.py,test_job_queue.py,test_longshot_ctl.py,test_pads_after_menu.py,test_perf_report.py,test_release.py,test_spawn_emit.py,test_tested_configurations.py,test_work_lock.py.test_linux_update.py,test_mods_size_table.py,test_nonuniform_image_arrays.py.Not tested: fresh game binaries/performance after the
8e9cfc3arebase and SDL2 correction; real hotplug/reconnect, changed-choice restart persistence, mixed-DPI corner cases, and Linux multi-display/X11/independent SDL3 runtime targeting. Synthetic fixtures do not establish compositor/device behavior. These are explicit coverage limits; a complete backend matrix is not claimed or imposed as a universal policy requirement. Normal website catalogue/progress-feed failures are retained as unrelated baseline limits, not new monitor-specific repair requirements.Must be tested:
Screenshots and guide review
Both views render the maintained menu at 1280×720, English, Medium scale, with identical synthetic defaults and Fullscreen selected. The helper from
54d25c79is used on both sides; no game assets, saved configuration, real monitor probe or named monitor simulation is involved. These illustrate the new row; runtime behavior is tested separately.Before: main @
e335bd5cb3.After: this PR @
54d25c79ea.The canonical first-view Graphics guide image is independently refreshed from
54d25c79; its manifest records exact source/fixture dependencies, including monitor_choice.h, and actual compiler/SDL/libpng versions. Asset/source review passes for Longshot and all 14 screenshot regression tests pass. Unchanged Launcher source reviews are explicitly not checked. Focused website selector/visibility regressions pass (9/9); the complete Graphics test file is 17 pass/two existing baseline failures (HDR negative fixture and stale Threaded rendering restart expectation), retained unchanged.A source-only catalogue-fixture preview of
29267466retained 486 valid records and excluded exactly four malformed baseline fragments: shadow-map-slots on/off and dead-targets-every-present old/new. Production source guards and the actual guide/menu/README/PNG were unchanged. That private preview built 20 pages and passed six desktop/mobile light/dark states (1440, 390 and 360 px), eight native 100/125/150/200-percent zoom states, and six expanded monitor-card captures. Image hash/load, captions, overflow, keyboard full-image navigation and the actual monitor card were checked; sample screenshots were visually inspected. Owned headless browsers exited normally with no console errors or HTTP 404s. This is layout evidence, not a successful normal production build. Itsnpm run checkremains blocked at the existing invalid progress feed before the complete Node suite runs. The original records and production guards are unchanged.Risks
What could break: monitor topology changes, native window restoration, cursor clipping or compositor-specific fullscreen requests. Linux names are backend-qualified, not universal hardware serial numbers; renamed or indistinguishable outputs can make a saved preference unavailable.
Turning it off: choose Auto (current monitor) to restore the default targeting preference. Revert the change to remove the selector and its host callbacks.
Compatibility: saves and existing audio controls are unchanged. The new settings keys are owned by the menu. ABI 29 preserves main's version-27 main-thread timing and version-28 out-of-memory callbacks and appends the three monitor callbacks; a later game build must use matching host and renderer modules. Current native fixtures check the version, offsets and initializer slots. Existing playable installs are not replaced. The monitor feature itself does not change shader translation or invalidate caches; unrelated upstream changes can still require normal preparation. No optional SDK or third-party source is added.
Checklist
Everyone
type(scope): description) of the status line's type.main. Pinnedf88e6e3a, all three conflicts reconciled, ABI 29 preserves upstream slot order. Current affected checks and matching-main controls are recorded above; no moving-base claim beyond this pin.python -I -B tests/run_all.pypasses (any failure that also fails onmainis named). Complete suites/controls against17394b71plus currente335bd5caffected selections/controls are recorded separately; all observed failures reproduce on their matching main. Overall suites are not green.third_party/untouched (a new folder with aPROVENANCE.mdinstead).When it applies
Assisted-by:/Co-Authored-By:trailers. Verified on pure-feature and test-record commits.docs/tested/for each new measured run (format indocs/tested-configurations.md). Eight individual measurement records are retained unchanged, each previously passing the production fragment parser. Ancillary functional/game-free history is preserved privately, with results summarized in this description.MKWVK_API_VERSIONbumped (gpu/vk/vk_api.h'sMkwVkHostorMkwVkRendererchanged).tests/that reads changed source updated in this PR, not weakened.Tested in game: Windows 10, RTX 3080/NVIDIA 621.24: owner confirmed four friendly monitor names and correct fullscreen targeting on the earlier feature build. Ubuntu 26.04.1 Wayland, RTX 5090 Laptop/NVIDIA 595.99.02: owner confirmed single-display Auto/named selection and fullscreen entry/exit. Refreshed e335bd5c-based monitor plus common Dev capture instrumentation (08b4a0a8) ran two warmups and two measured Kakariko samples per host; no known runtime/compile error markers, normal quits, Dev captures verified. Current multi-display hotplug/restart/backend edge cases remain pending as listed; measurements are not claimed for raw upstream or pure ABI-27 binaries.
Matched UI-only Screen views, rendered by the maintained menu/ImGui/Libertinus helper at 1280×720 with identical synthetic display/defaults and Fullscreen selected. No game assets, saved settings, real monitor probe or named monitor simulation is involved. These demonstrate the new visible row; runtime targeting evidence remains separate.
Before: main @
e335bd5cb3, with the committed helper from54d25c79for the same settled view.After: this PR @
54d25c79ea. Fullscreen monitor appears below Fullscreen and defaults to Auto (current monitor).The canonical first-view Graphics guide image, caption and compiler-discovered provenance are refreshed separately in
29267466. Asset/source review and 14 screenshot regression tests pass; unchanged Launcher source reviews are explicitly not checked. The PR remains WIP while the listed rebase/runtime/backend coverage and website-build limits are outstanding.Added the matched source-pinned Screen screenshots to the description and refreshed the canonical Graphics image/caption/provenance. Pushed UI-only capture support and the scoped identity-backed selector catalogue integration through
29267466; no game code or measured settings changed. Longshot image/source checks and 14 screenshot tests pass; focused new guide regressions pass. The normal site build remains blocked by existing malformed multi-row catalogue entries, so an explicitly labelled isolated catalogue-fixture preview is checking layout separately. Keeping WIP for current-main reconciliation and listed runtime/backend coverage.Guide review is complete within the stated limits: Longshot image/source checks and 14 screenshot tests pass; the isolated catalogue-fixture preview built 20 pages and passed six desktop/mobile/theme and eight native-zoom states, with expanded monitor-card checks. Normal production build/catalogue and progress-feed blockers are explicitly retained, not bypassed. Final documentation evidence is pushed at
1f287fab. A separate read-only live-main audit found main now at8e9cfc3a(eight commits after our tested base), with four conflicts in the API, backend initializer and two audio/mic fixtures. Both sides independently use ABI 27, so reconciliation must preserve upstream main_thread_times after perf_info and use a fresh ABI with aligned callbacks/fixtures. No conflicts were resolved, no rebase or new game runs occurred. Keeping WIP for that reconciliation and listed runtime/backend coverage.1f287fab38cf63f66f88Rebased onto pinned main
8e9cfc3aand resolved all four conflicts. ABI 28 keeps perf_info then upstream main_thread_times before the appended monitor callbacks; initializer/compiled offsets agree. Independent read-only code review found an SDL2 already-fullscreen retarget no-op: fixed via leave/position/re-enter, with a corrected fake that fails before the fix and passes afterward, including failure/retry and changing-position restoration. Final source checks: Windows 50 pass/8 failures (2 declared POSIX exclusions); laptop Linux 53 pass/7 failures. Every failure reproduces with matching primary diagnostics on clean exact main; no branch-only failure. Independent format review is addressed: added raw retained timed FPS lines, refreshed head/ABI/conflict wording, and separated optional coverage/baseline site data limits from new gates. Guide dependencies were reprocessed/reviewed and original images retained accurately; source/asset checks and 14 image tests pass. No game rebuild, shader preparation, gameplay or new measurement run. Earlier FPS figures remain explicitly tied to the original instrumented base; the steady Auto path was not changed by the SDL2 transition fix. Pushedcf63f66fwith an exact lease. The remaining Linux SDL2 multi-display runtime confirmation is named in Testing; keeping this draft status unchanged.WIP: feat(graphics): choose the monitor used for fullscreento feat(graphics): choose the monitor used for fullscreenScreenshot in the diff?
Trimmed the diff in
d32a6623: moved eleven ancillary functional/suite/rebase records to private evidence, preserving their results in the description. The eight required measured-run summaries and all regression tests remain unchanged. Hash verification and git diff --check passed; no rebuild, launch or game interaction was performed.@HumanBean wrote in #1277 (comment):
should be all set now on this. trimmed the diff by removing extra run testing evidence that wasn't needed but left the required ones from the contributing guide.
Sorry one sec. Few more conflicts to fix here quick.
d32a662399c0dfffe730Rebased onto latest main
f88e6e3a; resolved the three API/backend/test conflicts. ABI 29 preserves upstream out_of_memory and appends monitor callbacks, with compiled offset/initializer regression checks. Affected selection: Windows 37 pass/7 failures (two declared POSIX exclusions), Linux 41 pass/5 failures; every failure reproduces on exact main with matching primary diagnostics. No branch-only failure. Guide dependency/source review and screenshot regressions pass with original capture identities retained. Independent final main check found no further movement. No game rebuild, shader prep, launch or fresh performance run; historical runtime/measurement evidence retains its actual revisions.mooki referenced this pull request2026-11-17 05:54:56 +00:00