Window: VICTORY_BORDERLESS=1 covers the primary display without border or title bar #311

Closed
github-bot wants to merge 1 commit from github-bot/gh-311 into main AGit
Owner

@⁠Sr-0w on GitHub · 2026-11-26 15:44 UTC · original
window/borderless → main · +114 −12 · 3 files · 1 commits · closed without merging

What

VICTORY_BORDERLESS=1 opens the window as windowed borderless on the primary display: WS_POPUP, no border, no title bar, sized to the display's rectangle (MonitorFromPoint + GetMonitorInfoW). It is off by default. Without it the window is exactly as before (WS_OVERLAPPEDWINDOW around the client size).

  • Not exclusive full screen. The swap chain stretches the picture to the window and the title's render size is unchanged. Alt-tab, other windows and capture tools behave as with any borderless window.
  • scripts\play.ps1 -Borderless sets it, and the README lists it under "Other switches".
  • window_place decides the style and rectangle. It is unit-tested for both cases: a display given (including a display at negative desktop coordinates, left of the primary one), and none.

Why

Until now the only window was the bordered one, so playing full screen meant resizing it by hand.

Tested

  • cargo test -p victory-gpu window_place: 2 passed.
  • cargo clippy -p victory-gpu --all-targets --locked -- -D warnings is clean for this change. On main it stops earlier on watch.rs:3626 (unnecessary_mut_passed), which is not from this PR (see #280, fixed by #169/#241).
  • In game, RX 7800 XT on a 2560×1440 primary display, Series X profile with -RayTracing: the same style and rectangle applied to the running window (WS_POPUP, display rectangle) give a borderless full-screen picture. There is no change in frame rate, since the render size stays the same and only the present is stretched. The switch's own build has not been run in the world yet; I will add that run here.

🤖 Generated with Claude Code

**@⁠Sr-0w** on GitHub · 2026-11-26 15:44 UTC · [original](https://github.com/avatarmanz/VIctory-7900XTX/pull/311) `window/borderless` → `main` · +114 −12 · 3 files · 1 commits · closed without merging ## What `VICTORY_BORDERLESS=1` opens the window as **windowed borderless** on the primary display: `WS_POPUP`, no border, no title bar, sized to the display's rectangle (`MonitorFromPoint` + `GetMonitorInfoW`). It is off by default. Without it the window is exactly as before (`WS_OVERLAPPEDWINDOW` around the client size). - Not exclusive full screen. The swap chain stretches the picture to the window and the title's render size is unchanged. Alt-tab, other windows and capture tools behave as with any borderless window. - `scripts\play.ps1 -Borderless` sets it, and the README lists it under "Other switches". - `window_place` decides the style and rectangle. It is unit-tested for both cases: a display given (including a display at negative desktop coordinates, left of the primary one), and none. ## Why Until now the only window was the bordered one, so playing full screen meant resizing it by hand. ## Tested - `cargo test -p victory-gpu window_place`: 2 passed. - `cargo clippy -p victory-gpu --all-targets --locked -- -D warnings` is clean for this change. On main it stops earlier on `watch.rs:3626` (`unnecessary_mut_passed`), which is not from this PR (see #280, fixed by #169/#241). - In game, RX 7800 XT on a 2560×1440 primary display, Series X profile with `-RayTracing`: the same style and rectangle applied to the running window (`WS_POPUP`, display rectangle) give a borderless full-screen picture. There is no change in frame rate, since the render size stays the same and only the present is stretched. The switch's own build has not been run in the world yet; I will add that run here. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Windowed borderless, not exclusive full screen: the window takes the
primary display's rectangle (MonitorFromPoint + GetMonitorInfoW) with
WS_POPUP, the swap chain stretches the picture to it, the title's render
size is unchanged. Off by default; play.ps1 -Borderless sets it; README
lists it with the other switches. window_place is tested for both cases
(a display given, including negative desktop coordinates, and none).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 15:48:48 +00:00
github-bot closed this pull request 2026-11-27 14:52:43 +00:00

Pull request closed

This discussion has been locked. Commenting is limited to contributors.
No description provided.