fix: ignore stale plain VICTORY_FRAMEGEN_X in settings() (#966) #3274

Open
t91a60 wants to merge 1 commit from upstream-pr/3274 into main
t91a60 commented 2026-11-29 21:14:01 +00:00 (Migrated from github.com)

Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by t91a60 on 2026-11-29T21:14:01Z.


Refs #966

What it changes

Frame generation can load at 4x even when the F1 menu and victory-settings.txt say 2x
(#966, RTX 5080, log + screenshot). Issue #966 was closed by the stale-bot on 2026-11-29,
but the underlying defect is still present on current main: the verbatim-apply guard is
absent and the regression test fails without the fix (apps/victory/src/play.rs:1618,
assertion left == right).

Root cause: settings() derives VICTORY_FRAMEGEN / VICTORY_FRAMEGEN_X from
VICTORY_MENU_FRAMEGEN and the DLSS/FSR state, then applies every plain VICTORY_* line
from victory-settings.txt verbatim. A stale plain VICTORY_FRAMEGEN_X left in the file
(e.g. 4 from an earlier run) overrides the computed value (e.g. 2).

Change: in the verbatim-apply loop, skip VICTORY_FRAMEGEN and VICTORY_FRAMEGEN_X so
play.rs stays their sole owner. 28 lines added in one file. No behavior change beyond
fixing the precedence; no emulation output, shader cache key, or memory-guard interaction.

How it was tested

  • cargo test -p victory --locked: 80 passed, 0 failed (was 79; new regression test
    a_stale_plain_framegen_x_does_not_override_the_menu added).
  • cargo clippy -p victory --locked --no-deps -- -D warnings: clean.
  • Full workspace clippy (both CI variants) on f72cec77 has pre-existing failures unrelated
    to this change (unused imports in victory-shader/victory-loader, manual-is-multiple-of
    in victory-gpu, too-many-args). Reported separately, not fixed here.
  • cargo test --workspace --locked: 1128 passed, 1 failed (xtask policy bindings.ini,
    pre-existing on this commit).

What is UNVERIFIED

  • Whether the reporter's log corresponds exactly to this precedence bug (root cause
    inferred from code, not confirmed from the log).
  • In-game reproduction on RTX 3060 Ti (no game run in this session).

AI assistance

This change was prepared with AI assistance. The diff and tests were reviewed by me.

Checked for overlap

  • Searched open pull requests: none reference #966 or stale VICTORY_FRAMEGEN_X.
<!-- greyfinch-sync:trustno1-coder/VIctory-NVIDIA:issue:5555186831 --> Imported from [trustno1-coder/VIctory-NVIDIA](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/3274). Originally posted by [t91a60](https://github.com/t91a60) on 2026-11-29T21:14:01Z. --- Refs #966 ## What it changes Frame generation can load at 4x even when the F1 menu and victory-settings.txt say 2x (#966, RTX 5080, log + screenshot). Issue #966 was closed by the stale-bot on 2026-11-29, but the underlying defect is still present on current main: the verbatim-apply guard is absent and the regression test fails without the fix (apps/victory/src/play.rs:1618, assertion `left == right`). Root cause: `settings()` derives `VICTORY_FRAMEGEN` / `VICTORY_FRAMEGEN_X` from `VICTORY_MENU_FRAMEGEN` and the DLSS/FSR state, then applies every plain `VICTORY_*` line from victory-settings.txt verbatim. A stale plain `VICTORY_FRAMEGEN_X` left in the file (e.g. 4 from an earlier run) overrides the computed value (e.g. 2). Change: in the verbatim-apply loop, skip `VICTORY_FRAMEGEN` and `VICTORY_FRAMEGEN_X` so play.rs stays their sole owner. 28 lines added in one file. No behavior change beyond fixing the precedence; no emulation output, shader cache key, or memory-guard interaction. ## How it was tested - `cargo test -p victory --locked`: 80 passed, 0 failed (was 79; new regression test `a_stale_plain_framegen_x_does_not_override_the_menu` added). - `cargo clippy -p victory --locked --no-deps -- -D warnings`: clean. - Full workspace clippy (both CI variants) on f72cec77 has pre-existing failures unrelated to this change (unused imports in victory-shader/victory-loader, manual-is-multiple-of in victory-gpu, too-many-args). Reported separately, not fixed here. - `cargo test --workspace --locked`: 1128 passed, 1 failed (xtask policy bindings.ini, pre-existing on this commit). ## What is UNVERIFIED - Whether the reporter's log corresponds exactly to this precedence bug (root cause inferred from code, not confirmed from the log). - In-game reproduction on RTX 3060 Ti (no game run in this session). ## AI assistance This change was prepared with AI assistance. The diff and tests were reviewed by me. ## Checked for overlap - [x] Searched open pull requests: none reference #966 or stale VICTORY_FRAMEGEN_X.
ErRusso commented 2026-11-29 21:25:03 +00:00 (Migrated from github.com)

Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by ErRusso on 2026-11-29T21:25:03Z.

Review: COMMENTED


Reviewed against main (fbe3dc20). The root cause is right and the fix is small; good to merge.

  • In settings() the frame generation keys are computed (play.rs:473,496) and then the plain lines from victory-settings.txt are applied over them, so a leftover VICTORY_FRAMEGEN_X wins. Skipping the two keys there fixes it; --set (o.more) still overrides, which looks intended.
  • Side benefit: a plain VICTORY_FRAMEGEN=1 in the file can no longer turn frame generation on without DLSS (the #331/#459 stop).

Nit: the line is now dropped silently. #3253 recommends users keep their own VICTORY_* lines in that file, so a one-line notice in the launcher window ("VICTORY_FRAMEGEN_X in victory-settings.txt is ignored; F1 sets it") would save a confused report later.

<!-- greyfinch-sync:trustno1-coder/VIctory-NVIDIA:review:6104874532 --> Imported from [trustno1-coder/VIctory-NVIDIA](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/3274#pullrequestreview-6104874532). Originally posted by [ErRusso](https://github.com/ErRusso) on 2026-11-29T21:25:03Z. **Review:** COMMENTED --- Reviewed against main (fbe3dc20). The root cause is right and the fix is small; good to merge. - In `settings()` the frame generation keys are computed (`play.rs:473,496`) and then the plain lines from `victory-settings.txt` are applied over them, so a leftover `VICTORY_FRAMEGEN_X` wins. Skipping the two keys there fixes it; `--set` (`o.more`) still overrides, which looks intended. - Side benefit: a plain `VICTORY_FRAMEGEN=1` in the file can no longer turn frame generation on without DLSS (the #331/#459 stop). Nit: the line is now dropped silently. #3253 recommends users keep their own `VICTORY_*` lines in that file, so a one-line notice in the launcher window ("VICTORY_FRAMEGEN_X in victory-settings.txt is ignored; F1 sets it") would save a confused report later.
andrewpozdnakov7-jpg commented 2026-12-01 10:37:51 +00:00 (Migrated from github.com)

Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by andrewpozdnakov7-jpg on 2026-12-01T10:37:51Z.


I rebased your three commits onto current main 5fabb46, preserving the Git author. I kept the preload regression beside the moved settings test when resolving the conflict.

The narrow variant still discards the plain VICTORY_FRAMEGEN_X when that is the user's only frame-generation setting in the file. Follow-up commit applies the F1 precedence only when the file has a saved F1 choice and prints the notice in that case.

The focused Windows test confirms three paths: saved F1 2 beats a stale plain 4; a plain 4 is kept when there is no saved F1 choice; and explicit --set VICTORY_FRAMEGEN_X=5 still wins. The staged policy check passed. Git also merges the rebased branch cleanly with #4796's current head and the proposed warning update. The checks did not run the game.

Please retain the Git author on cherry-pick or rebase, or add Co-authored-by: andrewpozdnakov7-jpg <[email protected]> if folding the follow-up into another commit.

<!-- greyfinch-sync:trustno1-coder/VIctory-NVIDIA:comment:7308475645 --> Imported from [trustno1-coder/VIctory-NVIDIA](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/3274#issuecomment-7308475645). Originally posted by [andrewpozdnakov7-jpg](https://github.com/andrewpozdnakov7-jpg) on 2026-12-01T10:37:51Z. --- I rebased your three commits onto current `main` `5fabb46`, preserving the Git author. I kept the preload regression beside the moved settings test when resolving the conflict. The narrow variant still discards the plain `VICTORY_FRAMEGEN_X` when that is the user's only frame-generation setting in the file. [Follow-up commit](https://github.com/andrewpozdnakov7-jpg/VIctory-NVIDIA/commit/cab8245214d5be4576470e52de20767cfe072af7) applies the F1 precedence only when the file has a saved F1 choice and prints the notice in that case. The focused Windows test confirms three paths: saved F1 `2` beats a stale plain `4`; a plain `4` is kept when there is no saved F1 choice; and explicit `--set VICTORY_FRAMEGEN_X=5` still wins. The staged policy check passed. Git also merges the rebased branch cleanly with #4796's current head and the proposed warning update. The checks did not run the game. Please retain the Git author on cherry-pick or rebase, or add `Co-authored-by: andrewpozdnakov7-jpg <[email protected]>` if folding the follow-up into another commit.
t91a60 commented 2026-12-01 13:45:01 +00:00 (Migrated from github.com)

Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by t91a60 on 2026-12-01T13:45:01Z.


Reviewed against main (fbe3dc2). The root cause is right and the fix is small; good to merge.

Nit: the line is now dropped silently. #3253 recommends users keep their own VICTORY_* lines in that file, so a one-line notice in the launcher window ("VICTORY_FRAMEGEN_X in victory-settings.txt is ignored; F1 sets it") would save a confused report later.

Thanks for the review — the root cause and precedence analysis are exactly right, and --set still winning is intended.

The silent-drop nit is addressed, but I refined it further so the fix doesn't throw away a user's only frame-generation setting: the plain VICTORY_FRAMEGEN_X is now ignored only when VICTORY_MENU_FRAMEGEN exists in the file (i.e. a saved F1 choice owns the factor); otherwise the plain value is kept. The notice is printed only in that case — "The saved F1 frame generation choice takes precedence over VICTORY_FRAMEGEN_X." — so a stale value no longer wins silently, while hand-edited files keep working. --set VICTORY_FRAMEGEN_X=… still overrides both.

Rebased onto current main (5fabb46e); the regression test now covers three paths: saved F1 2 beats stale plain 4; plain 4 kept with no saved F1 choice; explicit --set …=5 wins. (The separate #331/#459 "no frame gen without DLSS" guard is intentionally left out of this PR to keep it focused; happy to add it as a follow-up if you'd like.)

<!-- greyfinch-sync:trustno1-coder/VIctory-NVIDIA:comment:7313113691 --> Imported from [trustno1-coder/VIctory-NVIDIA](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/3274#issuecomment-7313113691). Originally posted by [t91a60](https://github.com/t91a60) on 2026-12-01T13:45:01Z. --- > Reviewed against main ([fbe3dc2](https://github.com/trustno1-coder/VIctory-NVIDIA/commit/fbe3dc20521247298809e978abb05fe7b8cebe0f)). The root cause is right and the fix is small; good to merge. > > * In `settings()` the frame generation keys are computed (`play.rs:473,496`) and then the plain lines from `victory-settings.txt` are applied over them, so a leftover `VICTORY_FRAMEGEN_X` wins. Skipping the two keys there fixes it; `--set` (`o.more`) still overrides, which looks intended. > * Side benefit: a plain `VICTORY_FRAMEGEN=1` in the file can no longer turn frame generation on without DLSS (the [VIctory: unhandled exception 0x80000003 #331](https://github.com/trustno1-coder/VIctory-NVIDIA/issues/331)/[Series S with --dlss off on an RTX 30 ends during the boot screens (exit code 3) once AMD's FSR 3 files are fetched; --no-framegen-ready avoids it #459](https://github.com/trustno1-coder/VIctory-NVIDIA/issues/459) stop). > > Nit: the line is now dropped silently. [#3253](https://github.com/trustno1-coder/VIctory-NVIDIA/issues/3253) recommends users keep their own `VICTORY_*` lines in that file, so a one-line notice in the launcher window ("VICTORY_FRAMEGEN_X in victory-settings.txt is ignored; F1 sets it") would save a confused report later. Thanks for the review — the root cause and precedence analysis are exactly right, and `--set` still winning is intended. The silent-drop nit is addressed, but I refined it further so the fix doesn't throw away a user's *only* frame-generation setting: the plain `VICTORY_FRAMEGEN_X` is now ignored only when `VICTORY_MENU_FRAMEGEN` exists in the file (i.e. a saved F1 choice owns the factor); otherwise the plain value is kept. The notice is printed only in that case — "The saved F1 frame generation choice takes precedence over VICTORY_FRAMEGEN_X." — so a stale value no longer wins silently, while hand-edited files keep working. `--set VICTORY_FRAMEGEN_X=…` still overrides both. Rebased onto current main (`5fabb46e`); the regression test now covers three paths: saved F1 `2` beats stale plain `4`; plain `4` kept with no saved F1 choice; explicit `--set …=5` wins. (The separate #331/#459 "no frame gen without DLSS" guard is intentionally left out of this PR to keep it focused; happy to add it as a follow-up if you'd like.)
t91a60 commented 2026-12-01 13:45:11 +00:00 (Migrated from github.com)

Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by t91a60 on 2026-12-01T13:45:11Z.


I rebased your three commits onto current main 5fabb46, preserving the Git author. I kept the preload regression beside the moved settings test when resolving the conflict.

The narrow variant still discards the plain VICTORY_FRAMEGEN_X when that is the user's only frame-generation setting in the file. Follow-up commit applies the F1 precedence only when the file has a saved F1 choice and prints the notice in that case.

The focused Windows test confirms three paths: saved F1 2 beats a stale plain 4; a plain 4 is kept when there is no saved F1 choice; and explicit --set VICTORY_FRAMEGEN_X=5 still wins. The staged policy check passed. Git also merges the rebased branch cleanly with #4796's current head and the proposed warning update. The checks did not run the game.

Please retain the Git author on cherry-pick or rebase, or add Co-authored-by: andrewpozdnakov7-jpg <[email protected]> if folding the follow-up into another commit.

Thanks — took the conditional approach (ignore plain VICTORY_FRAMEGEN_X only when a saved F1 choice exists) and added the notice only in that case. Rebased and tests updated.

<!-- greyfinch-sync:trustno1-coder/VIctory-NVIDIA:comment:7313118197 --> Imported from [trustno1-coder/VIctory-NVIDIA](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/3274#issuecomment-7313118197). Originally posted by [t91a60](https://github.com/t91a60) on 2026-12-01T13:45:11Z. --- > I rebased your three commits onto current `main` `5fabb46`, preserving the Git author. I kept the preload regression beside the moved settings test when resolving the conflict. > > The narrow variant still discards the plain `VICTORY_FRAMEGEN_X` when that is the user's only frame-generation setting in the file. [Follow-up commit](https://github.com/andrewpozdnakov7-jpg/VIctory-NVIDIA/commit/cab8245214d5be4576470e52de20767cfe072af7) applies the F1 precedence only when the file has a saved F1 choice and prints the notice in that case. > > The focused Windows test confirms three paths: saved F1 `2` beats a stale plain `4`; a plain `4` is kept when there is no saved F1 choice; and explicit `--set VICTORY_FRAMEGEN_X=5` still wins. The staged policy check passed. Git also merges the rebased branch cleanly with [#4796](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/4796)'s current head and the proposed warning update. The checks did not run the game. > > Please retain the Git author on cherry-pick or rebase, or add `Co-authored-by: andrewpozdnakov7-jpg <[email protected]>` if folding the follow-up into another commit. Thanks — took the conditional approach (ignore plain `VICTORY_FRAMEGEN_X` only when a saved F1 choice exists) and added the notice only in that case. Rebased and tests updated.
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/3274:upstream-pr/3274'
git switch 'upstream-pr/3274'

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