1440p UI Scaling Fix #541
No reviewers
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/trustno1-coder--VIctory-NVIDIA!541
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-541"
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?
@Remorc-e on GitHub · 2026-11-28 00:33 UTC · original
Remorc-e:fix/1440p-ui-scaling→main· +73 −38 · 1 files · 1 commits · openThe problem
With the 1440p output (
-Res 1440, the launcher's default), menus and the HUD are drawn about 1.5 times too large and overlap: on Settings > Control Scheme the callout labels spill over the list, the tab row runs off to the right and the footer prompts collide. Reported in #98 ("Screen scaling is really big") and #301 ("HUD size issue"); #134 saw it on the same screen. With-Res 4k, and in Series S mode, the same screen is laid out correctly.The cause
The title's menus are authored for 3840x2160. It scales them onto a smaller surface only when its legacy UI flag (
0xA9438F4, a byte) is set, and it sets that flag from its console preset:A real Series X always outputs 3840x2160, so it never needs the flag. With the 1440p patch the Series X UI was laid out on a 2560x1440 stage while its content stayed 4K-sized. Captures of the frontend layer at 1440p and at 4K show every element's screen transform exactly 1.500x larger at 1440p, at the same pixel offsets.
The fix
apps/victory/src/native_1440p.rs, each field checked against the stock bytes first like the existing ones:0x1E0FB69: the preset's legacy UI byte (mov al, [rdi+0x1e8]) loads as 1 (mov al, 1). The rest of the preset stays Series X.0x26192F9: the settings update that stores the flag again (mov [rsi+0x13c], r8b) stores 1.0x247AD4A, the UI memory pool: the constant this file called the scanout reservation is the Series X UI pool size in the UI setup at0x247AD10(mov ecx, 0x4000000; Series S gets0x5200000there bycmovneon the title's Series S check). With the flag set, the UI setup makes two 3840x2160 legacy surfaces and two 2560x1440 targets in it, and asserts that at most0x1FFFFFis left over (0x247AF25). It is now0x5E00000(94 MiB): those four surfaces rounded to 2 MiB. Without the room, the title's allocator asserted (int3at0x56A2AFD). Renamed toUI_POOL.0x58048D4, the Settings preview viewport load: no longer redirected to the SDR mode. With the flag set, the legacy size it loads is the right one.The cost is one 4K UI layer, as on Series S; the scene and the output stay 1440p.
Testing
cargo test --locked -p victory --bin victory native_1440pwithVICTORY_DISPLAY_PROFILE_TEST_IMAGEpointing at the retail v1.0.2.1 exe: both retail-image tests pass; the 1440p test now also checks the UI pool and the two flag patches.cargo clippy -p victory: no warnings in the changed file.Not tested: the 1080p-to-1440p scene (
-Res 1080to1440) and the HUD in gameplay, which use the same patch, and #137's ultrawide output, which would need its own pool size.8ea68ddf39to01e35e4850@Remorc-e on GitHub · 2026-11-28 00:34 UTC · original · edited 2026-11-28 00:36 UTC
Screenshots from this branch, Series X profile at the 1440p output (RTX 4070 Ti, DLSS and frame generation on).
Settings > Control Scheme with the F1 menu open, showing
CONSOLE: SERIES XandSERIES X PICTURE: 2560X1440:The same screen without the menu: every callout sits next to its button, the list shows all six rows with its
3 / 9counter, and the footer prompts are evenly spaced, as at the 4K output:@SeaLife on GitHub · 2026-11-28 00:58 UTC · original
Tested this on a combined local branch, findings below.
Setup: RTX 4070 Ti 12 GB, Ryzen 9 9950X, 64 GB RAM, Windows 11 (10.0.26300), driver 621.1.0, retail 1.0.2.1 (exe SHA-256
e95020b2…). Series X profile, 1440p output, DLSS Performance (scene 1280x720), DLSS frame generation 2x.Base:
main@64d4931plus these open PRs:#428, #340, #423, #339, #400, #315 (incl. #243), #242, #257, #223, #253, #222, #177, #353, #225, #386, #169, #390, #285, #280, #394, #534, #521, #475.
(#534 conflicts with #428 in
emit/lower.rson the pixel colour output; resolved by chaining both:let s = self.scrub_nan(f); self.clamp_hdr(s). Shader tests 292/292 pass.)#541 against #391: they are mutually exclusive (combined, the interface would be scaled down twice), so for this test #391 was reverted and #541 merged on its own.
native_1440pretail-image tests pass with the real exe.What breaks with #541 here: the map (pause menu → KARTE).
0x92d7924), which stays 2560x1440, while the interface now draws on the 3840x2160 legacy surface.What we use instead (#391 + two additions), tested in gameplay:
With #391 alone, two things were still off at 1440p:
77,54 3686x2052on the 2560x1440 output.on_canvas()only matches a viewport of exactly 3840x2160, so this one was drawn unscaled.draw.rs): a viewport that reaches past the 2560x1440 output but lies inside the canvas also counts as canvas. No draw onto the output itself has such a viewport.GetScreenSizethrough the interface's vtable (.rdata 0x619bd70, slot+0x30at0x619bda0,0xcab820), which still answers 2560x1440.native_1440p.rs): that slot points to #391's legacy-size copy (0x55ff290, 3840x2160), as on the stock 4K output. Switch:VICTORY_UI_SCREEN_VTABLE=0.Diagnostics we used:
VICTORY_UI_CANVAS_LOG=1logs each new viewport/scissor on the 2560x1440 output and whether it is scaled. That is how the77,54 3686x2052safe-area viewport showed up.Happy to share the diff if it helps. #541's approach (letting the title use its own legacy UI path) looks cleaner long-term, if the map's terrain/fog can be made to follow it.
@Remorc-e on GitHub · 2026-11-28 01:18 UTC · original
Double checking now, went with native legacy UI path to avoid needing to do per-screen type patches like in #391 .
I wasn't seeing that in my build which is just main + #541 . Not sure if there are compounding conflicts when you add all the others in.
@Remorc-e on GitHub · 2026-11-28 01:33 UTC · original
Not able to replicate that screenshot you shared earlier.
@SeaLife on GitHub · 2026-11-28 02:00 UTC · original
As you can see in your screenshot, the red dot is not where its supposed to be. I just ran main + 541 and you can see here, its not scaling right. So #391 plus the changes i made are working well on 1440p.
https://cdn.discordapp.com/attachments/1575253173256462492/1576055187502530560/2026-11-28_02-58-30.mp4?ex=6b0b8746&is=6b0a35c6&hm=cf0df1070905fc3fd8a74a2fa61e032a8d39f0fea3afbe90832e0c3384a87d7c&
@Remorc-e on GitHub · 2026-11-28 02:02 UTC · original
I misunderstood then, I thought you were referring to the double image you have in your screenshot where it looks like the map is pulled up 3/4 of the way to the top.
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.