Preserve the game aspect ratio in bordered windows #3388
No reviewers
Labels
No labels
AMD
audio
bug
confirmed
crash
cutscene
dlss
documentation
duplicate
enhancement
fixed-on-main
frame-generation
good first issue
help wanted
input
INTEL
invalid
lighting
linux-proton
memory
needs-info
needs-logs
needs-rebase
NVIDIA
performance
pr-diagnostics
pr-docs
pr-feature
pr-fix
pr-performance
pr-refactor
pr-tests
question
RAYTRACING
rendering
report
series-s
shaders
spam
startup
upstream
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/trustno1-coder--VIctory-NVIDIA!3388
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-3388"
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?
@jim139129 on GitHub · 2026-11-29 22:40 UTC · original
jim139129:fix/bordered-window-client-aspect→main· +82 −42 · 1 files · 1 commits · openWhat it changes
On a 2560×1440 desktop, a Series S game presenting at 1920×1080 looked too wide in its bordered window. Win32 takes the outer dimensions at creation, so the caption and borders took space away from the game.
Both CreateWindowEx paths now use the monitor DPI, window style and menu to calculate the frame. They fit the picture into the remaining work area or configured window limit before adding the frame back.
How it was tested
cargo test --locked --profile diag -p victory-hle -- --test-threads=1passed (424 unit tests and 2 integration tests, 5 ignored). The first parallel run had one failure ina_read_by_range_waits_only_for_a_remapping_that_meets_it, which passed on the serial run.Checked for overlap
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.