play: respect last-wins unset for VICTORY_FORCE_MFG_RTX40 #2576

Open
RanoGames wants to merge 1 commit from upstream-pr/2576 into main
RanoGames commented 2026-11-29 14:31:24 +00:00 (Migrated from github.com)

Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by RanoGames on 2026-11-29T14:31:24Z.


What it changes

Fixes VICTORY_FORCE_MFG_RTX40 handling in apps/victory/src/play.rs:

  • prepare() previously computed forced as s.get("VICTORY_FORCE_MFG_RTX40").or_else(|| menu.iter().find(...)) == Some("1"). Because settings() removes keys from s when victory-settings.txt contains an empty assignment (VICTORY_FORCE_MFG_RTX40=), a file with VICTORY_FORCE_MFG_RTX40=1 followed by VICTORY_FORCE_MFG_RTX40= left s without the key, causing .or_else(|| menu.iter().find(...)) to match the earlier =1 line instead of respecting last-line-wins.
  • Moved the VICTORY_FORCE_MFG_RTX40 == "1" check directly into force_mfg(&mut s) and removed the menu.iter().find(...) fallback, since settings() already resolves menu (last-line-wins, empty removes) and --set into s.
  • Added unit test play::tests::force_mfg_follows_last_setting_and_set_overrides.

How it was tested

  • GPU and profile (Series X or S, resolution, DLSS, frame generation, ray tracing): N/A (unit-test-only launcher config fix; no title/GPU run)
  • Before: VICTORY_FORCE_MFG_RTX40=1 followed by VICTORY_FORCE_MFG_RTX40= in victory-settings.txt still applied force_mfg.
  • After: force_mfg only applies when VICTORY_FORCE_MFG_RTX40=1 is the effective value in s after settings().
  • For shader changes, the wave sizes tested (32 and/or 64 lanes): N/A
  • cargo test passed for the crates it touches: yes (cargo test --locked -p victory: 79 unit tests + 1 cache_paths + 2 census passed; cargo clippy --no-deps --locked -p victory --all-targets -- -D warnings passed)

Checked for overlap

  • I searched the open pull requests for the same issue and for the files this touches.
<!-- greyfinch-sync:trustno1-coder/VIctory-NVIDIA:issue:5551696186 --> Imported from [trustno1-coder/VIctory-NVIDIA](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/2576). Originally posted by [RanoGames](https://github.com/RanoGames) on 2026-11-29T14:31:24Z. --- ## What it changes Fixes `VICTORY_FORCE_MFG_RTX40` handling in `apps/victory/src/play.rs`: - `prepare()` previously computed `forced` as `s.get("VICTORY_FORCE_MFG_RTX40").or_else(|| menu.iter().find(...)) == Some("1")`. Because `settings()` removes keys from `s` when `victory-settings.txt` contains an empty assignment (`VICTORY_FORCE_MFG_RTX40=`), a file with `VICTORY_FORCE_MFG_RTX40=1` followed by `VICTORY_FORCE_MFG_RTX40=` left `s` without the key, causing `.or_else(|| menu.iter().find(...))` to match the earlier `=1` line instead of respecting last-line-wins. - Moved the `VICTORY_FORCE_MFG_RTX40 == "1"` check directly into `force_mfg(&mut s)` and removed the `menu.iter().find(...)` fallback, since `settings()` already resolves `menu` (last-line-wins, empty removes) and `--set` into `s`. - Added unit test `play::tests::force_mfg_follows_last_setting_and_set_overrides`. ## How it was tested - GPU and profile (Series X or S, resolution, DLSS, frame generation, ray tracing): N/A (unit-test-only launcher config fix; no title/GPU run) - Before: `VICTORY_FORCE_MFG_RTX40=1` followed by `VICTORY_FORCE_MFG_RTX40=` in `victory-settings.txt` still applied `force_mfg`. - After: `force_mfg` only applies when `VICTORY_FORCE_MFG_RTX40=1` is the effective value in `s` after `settings()`. - For shader changes, the wave sizes tested (32 and/or 64 lanes): N/A - `cargo test` passed for the crates it touches: yes (`cargo test --locked -p victory`: 79 unit tests + 1 `cache_paths` + 2 `census` passed; `cargo clippy --no-deps --locked -p victory --all-targets -- -D warnings` passed) ## Checked for overlap - [x] I searched the open pull requests for the same issue and for the files this touches.
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/2576:upstream-pr/2576'
git switch 'upstream-pr/2576'

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/2576'
git switch 'upstream-pr/2576'
git rebase 'main'
git switch 'main'
git merge --ff-only 'upstream-pr/2576'
git switch 'upstream-pr/2576'
git rebase 'main'
git switch 'main'
git merge --no-ff 'upstream-pr/2576'
git switch 'main'
git merge --squash 'upstream-pr/2576'
git switch 'main'
git merge --ff-only 'upstream-pr/2576'
git switch 'main'
git merge 'upstream-pr/2576'
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
trustno1-coder/VIctory-NVIDIA!2576
No description provided.