loader: interface by its root size below 4K (fixes phone screen, nearby missions, map icons) #49

Open
GiovanniFadanelli wants to merge 1 commit from upstream-pr/49 into main
GiovanniFadanelli commented 2026-12-04 16:53:38 +00:00 (Migrated from github.com)

Imported from ReTerryDavis/ReVIctory. Originally posted by GiovanniFadanelli on 2026-12-04T16:53:38Z.


Summary

Fixes the interface below 4K output (e.g. VICTORY_OUTPUT=2560x1440): with the fwui layout scale from 36ea0e5 the HUD was the right size, but the phone screen's content was drawn in the top-left two thirds of the phone (the rest black) and the nearby-missions markers (hold D-pad down) were out of place.

Change

crates/victory-loader/src/resolution.rs, no new switch, Series S mode (own interface) unchanged:

  • Interface laid out by its root size. Below 2160 lines the UI root size (+0x1492d7924/28, written with the output size at +0x1de410a) becomes the output times 2160 / height (3840x2160 at 2560x1440). The title then lays its whole interface out as at 4K, draws it into a target of that size and scales that target to the output itself, so every part stays in proportion, including the phone and the 3D-anchored markers. The fwui scale patches are not written in that case; the pause-map cursor patches still are.
  • Screen map at the output size. The screen map instance takes its size from the UI root (+0x1833fd0), but the targets it draws into stay at the output size, so with the root at 3840x2160 its blips sat off the map, more so the further from the centre. The two loads at +0x1833fe3/+0x1833fed now read the output size (+0x148fdc560/+0x1491ac9fc), and +0x2a61610's size check calls the UI root provider's output-size slot (+0x18 instead of +0x30) so the map is not rebuilt every update.

Every site is compared byte for byte before it is written, as the other resolution patches are. Unit tests check the new displacements.

Test plan

  • cargo clippy --locked -p victory-loader --all-targets -- -D warnings
  • cargo build --release --locked -p victory
  • cargo test --locked -p victory-loader -- --test-threads=1
  • In game at 2560x1440 (RX 9070 XT), checked by eye: HUD, phone, nearby-missions markers, pause-map icons at several zoom levels, hover/click on the map, minimap
  • Other outputs (1920x1080, ultrawide) not checked by eye
  • NVIDIA not tested

🤖 Generated with Claude Code

<!-- greyfinch-sync:ReTerryDavis/ReVIctory:issue:5650647974 --> Imported from [ReTerryDavis/ReVIctory](https://github.com/ReTerryDavis/ReVIctory/pull/49). Originally posted by [GiovanniFadanelli](https://github.com/GiovanniFadanelli) on 2026-12-04T16:53:38Z. --- ## Summary Fixes the interface below 4K output (e.g. `VICTORY_OUTPUT=2560x1440`): with the `fwui` layout scale from 36ea0e5 the HUD was the right size, but the **phone screen's content** was drawn in the top-left two thirds of the phone (the rest black) and the **nearby-missions markers** (hold D-pad down) were out of place. ## Change `crates/victory-loader/src/resolution.rs`, no new switch, Series S mode (own interface) unchanged: - **Interface laid out by its root size.** Below 2160 lines the UI root size (+0x1492d7924/28, written with the output size at +0x1de410a) becomes the output times `2160 / height` (3840x2160 at 2560x1440). The title then lays its whole interface out as at 4K, draws it into a target of that size and scales that target to the output itself, so every part stays in proportion, including the phone and the 3D-anchored markers. The `fwui` scale patches are not written in that case; the pause-map cursor patches still are. - **Screen map at the output size.** The screen map instance takes its size from the UI root (+0x1833fd0), but the targets it draws into stay at the output size, so with the root at 3840x2160 its blips sat off the map, more so the further from the centre. The two loads at +0x1833fe3/+0x1833fed now read the output size (+0x148fdc560/+0x1491ac9fc), and +0x2a61610's size check calls the UI root provider's output-size slot (`+0x18` instead of `+0x30`) so the map is not rebuilt every update. Every site is compared byte for byte before it is written, as the other resolution patches are. Unit tests check the new displacements. ## Test plan - [x] `cargo clippy --locked -p victory-loader --all-targets -- -D warnings` - [x] `cargo build --release --locked -p victory` - [x] `cargo test --locked -p victory-loader -- --test-threads=1` - [x] In game at 2560x1440 (RX 9070 XT), checked by eye: HUD, phone, nearby-missions markers, pause-map icons at several zoom levels, hover/click on the map, minimap - [ ] Other outputs (1920x1080, ultrawide) not checked by eye - [ ] NVIDIA not tested 🤖 Generated with [Claude Code](https://claude.com/claude-code)
This pull request cannot be merged automatically due to conflicts.
Merge manually to resolve the conflicts.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin 'upstream-pr/49:upstream-pr/49'
git switch 'upstream-pr/49'

Merge

Merge the changes and update on Forgejo.

Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.

git switch 'main'
git merge --no-ff 'upstream-pr/49'
git switch 'upstream-pr/49'
git rebase 'main'
git switch 'main'
git merge --ff-only 'upstream-pr/49'
git switch 'upstream-pr/49'
git rebase 'main'
git switch 'main'
git merge --no-ff 'upstream-pr/49'
git switch 'main'
git merge --squash 'upstream-pr/49'
git switch 'main'
git merge --ff-only 'upstream-pr/49'
git switch 'main'
git merge 'upstream-pr/49'
git push origin 'main'
Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
ReTerryDavis/ReVIctory!49
No description provided.