victory-gpu: make mini-FPS overlay smaller and add VICTORY_FPS_SCALE #512

Open
github-bot wants to merge 1 commit from github-bot/gh-512 into main AGit
Owner

@⁠kwaadrat on GitHub · 2026-12-02 20:56 UTC · original
kwaadrat:fix/fps-overlay-smaller-scale → main · +32 −2 · 2 files · 1 commits · open

Fixes #493.

Problem

In crates/victory-gpu/src/host/fps.rs, scale(height) used (height / 540).max(1), which doubled the NATIVE / FG FPS overlay to 2x at 1080p and 1440p (48 px tall when stacked) and 4x at 4K (96 px tall), overlapping HUD elements like the top-left character status bar.

Fix

  • Change default scale(height) in crates/victory-gpu/src/host/fps.rs to (height / 1080).max(1), keeping the mini-FPS overlay at 1x up through 1440p and 2x at 4K.
  • Add an optional VICTORY_FPS_SCALE override (clamped to 1..=4) for users who want a larger or smaller overlay.
  • Add VICTORY_FPS_SCALE to NotOfShaders in launcher/Launcher.cs so setting it does not invalidate translated shaders.
  • Add unit test fps_overlay_scale_stays_compact_and_honors_override covering 720p/1080p/1440p/2160p defaults and VICTORY_FPS_SCALE parsing.

Verification

  • cargo xwin test --target x86_64-pc-windows-msvc --locked -p victory-gpu --lib fps_overlay (under Wine): 2 passed, 0 failed.
**@⁠kwaadrat** on GitHub · 2026-12-02 20:56 UTC · [original](https://github.com/readmet3xt-lab/foxhound/pull/512) `kwaadrat:fix/fps-overlay-smaller-scale` → `main` · +32 −2 · 2 files · 1 commits · open Fixes #493. ### Problem In `crates/victory-gpu/src/host/fps.rs`, `scale(height)` used `(height / 540).max(1)`, which doubled the `NATIVE` / `FG` FPS overlay to `2x` at 1080p and 1440p (48 px tall when stacked) and `4x` at 4K (96 px tall), overlapping HUD elements like the top-left character status bar. ### Fix - Change default `scale(height)` in `crates/victory-gpu/src/host/fps.rs` to `(height / 1080).max(1)`, keeping the mini-FPS overlay at `1x` up through 1440p and `2x` at 4K. - Add an optional `VICTORY_FPS_SCALE` override (clamped to `1..=4`) for users who want a larger or smaller overlay. - Add `VICTORY_FPS_SCALE` to `NotOfShaders` in `launcher/Launcher.cs` so setting it does not invalidate translated shaders. - Add unit test `fps_overlay_scale_stays_compact_and_honors_override` covering 720p/1080p/1440p/2160p defaults and `VICTORY_FPS_SCALE` parsing. ### Verification - `cargo xwin test --target x86_64-pc-windows-msvc --locked -p victory-gpu --lib fps_overlay` (under Wine): **2 passed, 0 failed**.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-12-02 20:59:31 +00:00
This pull request has changes conflicting with the target branch.
  • crates/victory-gpu/src/host/fps.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/512/head:github-bot/gh-512'
git switch 'github-bot/gh-512'

Merge

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