HUD : Size the interface for 3840x2160 on the 1440p output (HUD, menus, map cursor) #391

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

@⁠ZackariaB on GitHub · 2026-11-27 21:50 UTC · original
ZackariaB:hud-1440p → main · +300 −3 · 2 files · 2 commits · open

Fixes #98 at the 2560x1440 output (the Series X default, and -Res 1080to1440).

The problem

The interface is laid out for 3840x2160, the stock Series X output. With the 1440p image patch, the title is told the screen is 2560x1440, so:

  • the HUD and every menu came out 1.5 times too big;
  • Settings > Controls was cut to 2/3: the tab bar, part of the list and the "Default 1 / 3 < >" box were missing;
  • the map's cursor sat at 2/3 of the screen's centre, shifted to the upper left (the one BingYanchi reports).

Before and after (1440p, compared with the stock 4K output)

HUD. Before, at 1440p, the profile screen prompt was 1.5 times too big: it covered 16.6% of the window's width against 11% at 4K. After, it measures 11.05%, and the in-game HUD is the 4K size.

Before (1440p) After (1440p)
HUD before HUD after

Settings > Controls.

Before (1440p) After (1440p) 4K reference
Controls before Controls after Controls 4K

Map. Before, the cursor sat at 2/3 of the centre. After, it is centred, stays centred after snapping to a point of interest, and selects it. The terrain, the fog and the zone borders match the 4K output.

Before (1440p) After (1440p) 4K reference
Map before Map after Map 4K

The fix

apps/victory/src/native_1440p.rs

Applied with the 1440p patch at a 16:9 2560x1440 output. VICTORY_UI_SCREEN=0 turns it off.

  • Screen size getters. The interface reads its screen size through two getters (0x4f21f10, 0x4f21f00). They now read the legacy UI size, 3840x2160 at 0xa9438ec, as on the stock 4K output.
  • Scaleform buffer. Scaleform's buffer size, read at 0x13cba73, comes from the [3840.0, 2160.0] constant. Without this, Scaleform drops whatever lies past 2560x1440.
  • Menu target size. The menus read their target's size at 0x53915bc. That read jumps to a cave in int3 padding, which answers 3840x2160 in place of the output's 2560x1440. Any other size passes through unchanged.
  • Map cursor, when the map opens. The cursor's fraction of the screen is turned into interface pixels by a call at 0xb19a4b. That call now goes to a copy of GetScreenSize that answers 3840x2160.
  • Map cursor, after a snap.
    • The cursor's position is its object's +0x140. The interface is bound to it: 0x388fa0 notifies on change.
    • Its two GetScreenSizeF calls (0x2324351, 0x232478d) go to a copy that answers [3840.0, 2160.0], so the bound position is in interface pixels.
    • The four reads the map's logic makes of it call small stubs that scale it back by 2/3: what lies under the cursor, what is near it, where it points in the world, and the controller's copy.
    • The stubs live in the int3 padding past the code section's used size (0x5f40970). The file maps that padding with the section.
  • Left on the output's size. GetScreenSize itself and the screen size global keep 2560x1440. The map's terrain, its fog of unexplored zones and its zone borders are worked out from them. A 4K run shows all three in the same place as 1440p does.

crates/victory-gpu/src/draw.rs

  • Interface viewports. A viewport of exactly 3840x2160 on a target of at most 2560x1440 is the interface canvas. That viewport and its scissors are scaled onto the output.
  • Left alone. A full-output scissor stays as it is. So does the intro video's own 3840x2160 target, which no longer comes out small.

Checked

  • Tests. The native_1440p tests pass against the retail executable (VICTORY_DISPLAY_PROFILE_TEST_IMAGE).
  • Pre-existing failures. In victory-gpu, indirect::tests::host_list_budget_starts_empty_at_each_submission and warp_batch_charges_every_execution fail the same way on main without this change.
  • In game at 1440p, on this branch, compared with the 4K output:
    • profile screen;
    • intro video;
    • in-game HUD;
    • Settings > Controls;
    • map: cursor, points of interest, fog, zone borders.

Not covered

  • Other outputs. A 1920x1080 output (Series S, or a 1080p VICTORY_DISPLAY_MODE) is unchanged. Issue #98 also mentions it, but it is not the 1440p patch's path.
  • Not checked.
    • The mouse in menus.
    • The in-game fps cost. The menus' own fps went from about 440 to about 300 on the profile screen, because Scaleform now renders at its 4K size.
    • Every other screen. Some may still convert between screen and interface pixels with the output's size. For example, the place names on the map look slightly off in scale.

🤖 Generated with Claude Code

**@⁠ZackariaB** on GitHub · 2026-11-27 21:50 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/391) `ZackariaB:hud-1440p` → `main` · +300 −3 · 2 files · 2 commits · open Fixes #98 at the 2560x1440 output (the Series X default, and `-Res 1080to1440`). ## The problem The interface is laid out for 3840x2160, the stock Series X output. With the 1440p image patch, the title is told the screen is 2560x1440, so: - the HUD and every menu came out 1.5 times too big; - Settings > Controls was cut to 2/3: the tab bar, part of the list and the "Default 1 / 3 < >" box were missing; - the map's cursor sat at 2/3 of the screen's centre, shifted to the upper left (the one BingYanchi reports). ## Before and after (1440p, compared with the stock 4K output) **HUD.** Before, at 1440p, the profile screen prompt was 1.5 times too big: it covered 16.6% of the window's width against 11% at 4K. After, it measures 11.05%, and the in-game HUD is the 4K size. | Before (1440p) | After (1440p) | |---|---| | ![HUD before](https://raw.githubusercontent.com/ZackariaB/VIctory-NVIDIA/2e1b3e46c3a72d07bd9bd39036cc62ea58008eae/hud-before-profile.png) | ![HUD after](https://raw.githubusercontent.com/ZackariaB/VIctory-NVIDIA/2e1b3e46c3a72d07bd9bd39036cc62ea58008eae/hud-after-ingame.png) | **Settings > Controls.** | Before (1440p) | After (1440p) | 4K reference | |---|---|---| | ![Controls before](https://raw.githubusercontent.com/ZackariaB/VIctory-NVIDIA/2e1b3e46c3a72d07bd9bd39036cc62ea58008eae/controls-before.png) | ![Controls after](https://raw.githubusercontent.com/ZackariaB/VIctory-NVIDIA/2e1b3e46c3a72d07bd9bd39036cc62ea58008eae/controls-after.png) | ![Controls 4K](https://raw.githubusercontent.com/ZackariaB/VIctory-NVIDIA/2e1b3e46c3a72d07bd9bd39036cc62ea58008eae/controls-4k.png) | **Map.** Before, the cursor sat at 2/3 of the centre. After, it is centred, stays centred after snapping to a point of interest, and selects it. The terrain, the fog and the zone borders match the 4K output. | Before (1440p) | After (1440p) | 4K reference | |---|---|---| | ![Map before](https://raw.githubusercontent.com/ZackariaB/VIctory-NVIDIA/2e1b3e46c3a72d07bd9bd39036cc62ea58008eae/map-before.png) | ![Map after](https://raw.githubusercontent.com/ZackariaB/VIctory-NVIDIA/2e1b3e46c3a72d07bd9bd39036cc62ea58008eae/map-after.png) | ![Map 4K](https://raw.githubusercontent.com/ZackariaB/VIctory-NVIDIA/2e1b3e46c3a72d07bd9bd39036cc62ea58008eae/map-4k.png) | ## The fix ### `apps/victory/src/native_1440p.rs` Applied with the 1440p patch at a 16:9 2560x1440 output. `VICTORY_UI_SCREEN=0` turns it off. - **Screen size getters.** The interface reads its screen size through two getters (0x4f21f10, 0x4f21f00). They now read the legacy UI size, 3840x2160 at 0xa9438ec, as on the stock 4K output. - **Scaleform buffer.** Scaleform's buffer size, read at 0x13cba73, comes from the [3840.0, 2160.0] constant. Without this, Scaleform drops whatever lies past 2560x1440. - **Menu target size.** The menus read their target's size at 0x53915bc. That read jumps to a cave in int3 padding, which answers 3840x2160 in place of the output's 2560x1440. Any other size passes through unchanged. - **Map cursor, when the map opens.** The cursor's fraction of the screen is turned into interface pixels by a call at 0xb19a4b. That call now goes to a copy of `GetScreenSize` that answers 3840x2160. - **Map cursor, after a snap.** - The cursor's position is its object's +0x140. The interface is bound to it: 0x388fa0 notifies on change. - Its two `GetScreenSizeF` calls (0x2324351, 0x232478d) go to a copy that answers [3840.0, 2160.0], so the bound position is in interface pixels. - The four reads the map's logic makes of it call small stubs that scale it back by 2/3: what lies under the cursor, what is near it, where it points in the world, and the controller's copy. - The stubs live in the int3 padding past the code section's used size (0x5f40970). The file maps that padding with the section. - **Left on the output's size.** `GetScreenSize` itself and the screen size global keep 2560x1440. The map's terrain, its fog of unexplored zones and its zone borders are worked out from them. A 4K run shows all three in the same place as 1440p does. ### `crates/victory-gpu/src/draw.rs` - **Interface viewports.** A viewport of exactly 3840x2160 on a target of at most 2560x1440 is the interface canvas. That viewport and its scissors are scaled onto the output. - **Left alone.** A full-output scissor stays as it is. So does the intro video's own 3840x2160 target, which no longer comes out small. ## Checked - **Tests.** The `native_1440p` tests pass against the retail executable (`VICTORY_DISPLAY_PROFILE_TEST_IMAGE`). - **Pre-existing failures.** In `victory-gpu`, `indirect::tests::host_list_budget_starts_empty_at_each_submission` and `warp_batch_charges_every_execution` fail the same way on `main` without this change. - **In game at 1440p, on this branch, compared with the 4K output:** - profile screen; - intro video; - in-game HUD; - Settings > Controls; - map: cursor, points of interest, fog, zone borders. ## Not covered - **Other outputs.** A 1920x1080 output (Series S, or a 1080p `VICTORY_DISPLAY_MODE`) is unchanged. Issue #98 also mentions it, but it is not the 1440p patch's path. - **Not checked.** - The mouse in menus. - The in-game fps cost. The menus' own fps went from about 440 to about 300 on the profile screen, because Scaleform now renders at its 4K size. - Every other screen. Some may still convert between screen and interface pixels with the output's size. For example, the place names on the map look slightly off in scale. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
With the 1440p image patch the HUD and menus laid out in 2560x1440 while
their sizes are made for 3840x2160: the HUD came out 1.5 times too big
and Settings' panels were cut to 2/3.

- native_1440p.rs: the interface screen getters (0x4f21f10, 0x4f21f00)
  read the legacy 3840x2160 size, Scaleform's buffer size load
  (0x13cba73) reads [3840.0, 2160.0], and the menus' target size read
  (0x53915bc) jumps to a cave in int3 padding (0x55e8250) that gives the
  legacy size when it reads the output's. VICTORY_UI_SCREEN=0 turns it
  all off.
- draw.rs: viewports of exactly 3840x2160 on a target of at most
  2560x1440 (the interface canvas) and their scissors are scaled onto
  the output; a full-output scissor and the intro video's 3840x2160
  target are left as they are.

Checked in game at 1440p: HUD, intro video and Settings > Controls match
the 4K output.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
With the interface laid out in 3840x2160 on the 1440p output, the map's
cursor sat at 2/3 of the screen's centre, shifted to the upper left, and
went back there after snapping to a point of interest.

- When the map opens, 0xb19260 turns the cursor's fraction of the screen
  into interface pixels with GetScreenSize. That call (0xb19a4b) goes to
  a copy of GetScreenSize in int3 padding (0x55ff290) that answers
  3840x2160.
- After a snap the cursor's position is its object's +0x140, which the
  interface is bound to (0x388fa0 notifies on change). Its two
  GetScreenSizeF calls (0x2324351, 0x232478d) go to a copy that answers
  [3840.0, 2160.0], so the bound position is the interface's. The four
  reads the map's logic makes of it (under the cursor, near it, where it
  points in the world, the controller's copy) call stubs that scale it
  back by 2/3. The stubs live in the int3 padding past the code
  section's used size, which the file maps with it.

GetScreenSize and the screen size global keep the output's size: the
map's terrain, its fog, its zone borders and what the cursor points at
are worked out from it, as the 4K output shows them.

Checked in game at 1440p against the 4K output: cursor centred and
staying centred after snapping, points of interest selected, fog and
zone borders in place.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-27 21:52:45 +00:00
github-bot changed title from Size the interface for 3840x2160 on the 1440p output (HUD, menus, map cursor) to HUD : Size the interface for 3840x2160 on the 1440p output (HUD, menus, map cursor) 2026-11-28 00:11:18 +00:00
This pull request can be merged automatically.
This branch is out-of-date with the base branch
You are not authorized to merge this pull request.
View command line instructions

Checkout

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

Merge

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