Pr/433 window size #547

Open
github-bot wants to merge 2 commits from github-bot/gh-547 into main AGit
Owner

@⁠pug205gti6 on GitHub · 2026-11-25 02:06 UTC · original
pug205gti6:pr/433-window-size → main · +1021 −88 · 15 files · 2 commits · open

No description provided.

**@⁠pug205gti6** on GitHub · 2026-11-25 02:06 UTC · [original](https://github.com/fxceless/victory-fork/pull/547) `pug205gti6:pr/433-window-size` → `main` · +1021 −88 · 15 files · 2 commits · open *No description provided.*
A console title sizes its window to its render target, which on a 4K screen fills the whole screen. [window] size in victory.toml, or VICTORY_WINDOW_SIZE, now chooses the window instead: "title" (the default, as before: the title's size shrunk to the work area), "<width>x<height>" (a client area of that size, centred, shrunk to the work area if it does not fit), or "fullscreen" (borderless over the primary screen). Only the window changes; the title renders at its own size and the swap chain stretches the frame to the window.

victory now makes itself per-monitor DPI aware before any window exists, so sizes are physical pixels: on a screen scaled to 150 %, 1920x1080 is a quarter of a 4K screen, not 2880x1620. The client size is estimated with AdjustWindowRectExForDpi and corrected after creation if the real frame differs. The placement is a pure function, tested per mode without a screen.

(cherry picked from commit 3ec3bc906c17d45438a8ec411551a150a86b0a16)

AI-assisted (Claude Code)
The title keeps its own windows hidden, so the window on screen is the one victory-gpu makes to present to, sized to the frame (3840x2160 for this title) and placed by Windows. The placement moves to victory-gpu's window module: in "title" mode that window is now fitted to the work area and centred, "<width>x<height>" sets its client area, "fullscreen" makes it a borderless popup over the primary screen. It is created hidden and shown once its client size is right. The title's own windows only keep the existing shrink-to-the-screen fit: the title may read back its client size or styles, so they are not resized or restyled.

Closing that window (close button, Alt+F4, the taskbar) now ends the title through the same suspend path as closing the title's window, via a callback victory-hle registers; before, the window was destroyed and the title ran on without one. The window menu (Alt, F10) is ignored, so the keyboard pad cannot drive it.

(cherry picked from commit f036d84e77868a3b14850157e502377c70aee7a9)

AI-assisted (Claude Code)
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 03:46:03 +00:00
Author
Owner

@⁠Revens2 on GitHub · 2026-11-25 07:38 UTC · original

Duplicate of #433: @⁠sennecools opened this patch 77 minutes earlier, and gh pr diff returns the same bytes for both (+1021/-88 on 15 file(s), same title).

The original also carries the author's description, which this PR does not.

Please continue in #433 so the review history and any test data stay in one place.
Thanks.

**@⁠Revens2** on GitHub · 2026-11-25 07:38 UTC · [original](https://github.com/fxceless/victory-fork/pull/547#issuecomment-7156089121) Duplicate of #433: @⁠sennecools opened this patch 77 minutes earlier, and `gh pr diff` returns the same bytes for both (+1021/-88 on 15 file(s), same title). The original also carries the author's description, which this PR does not. Please continue in #433 so the review history and any test data stay in one place. Thanks.
This pull request has changes conflicting with the target branch.
  • crates/victory-gpu/Cargo.toml
  • crates/victory-gpu/src/lib.rs
View command line instructions

Manual merge helper

Use this merge commit message when completing the merge manually.

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin '+refs/pull/547/head:github-bot/gh-547'
git switch 'github-bot/gh-547'

Merge

Merge the changes and update on Forgejo.
git switch 'main'
git merge --no-ff 'github-bot/gh-547'
git switch 'github-bot/gh-547'
git rebase 'main'
git switch 'main'
git merge --ff-only 'github-bot/gh-547'
git switch 'github-bot/gh-547'
git rebase 'main'
git switch 'main'
git merge --no-ff 'github-bot/gh-547'
git switch 'main'
git merge --squash 'github-bot/gh-547'
git switch 'main'
git merge --ff-only 'github-bot/gh-547'
git switch 'main'
git merge 'github-bot/gh-547'
git push origin 'main'
This discussion has been locked. Commenting is limited to contributors.
No description provided.