F1 menu: keep a value set by hand in the setting's cycle #2296

Closed
github-bot wants to merge 0 commits from github-bot/gh-2296 into main AGit
Owner

@⁠oVolkra on GitHub · 2026-11-29 11:33 UTC · original
oVolkra:fix-1401-menu-hand-value → main · +80 −17 · 1 files · 1 commits · closed without merging

Part of #1401: the menu half of finding 4. The lighting remark and findings 1-3 are not touched.

What it changes

Problem. A setting started with a value its list lacks (VICTORY_AMBIENT=1.5 or constant:0.25 on LIGHT ESTIMATE) was shown, but Left/Right only walked the list, so after one press the value could not be picked again.

Fix, in the code every setting goes through (crates/victory-gpu/src/host/menu.rs, the only file changed):

  • Menu::change: the value the run started with, if unlisted, is one more entry after the last one, in both directions. The Series S DLAA skip still works.
  • It is kept in a new field, launched. started could not be used: save overwrites it, and every change is saved at once.
  • This also covers a setting that started as NOT SET and does not list the empty value: it can be picked again. save then writes NAME= (unset, as the file header says). For the launcher's own choices (VICTORY_MENU_*) it writes no line instead, because an empty one would override the launcher's option (an empty VICTORY_MENU_CONSOLE reads as Series X).

The value is kept for the current run only. If another one is picked and the game restarts, the file holds the new one.

How it was tested

  • GPU and profile: not tried in the game. Unit tests and checks on Windows only.
  • Before: with the change to change taken out, both tests below fail.
  • After: both pass.
    • New: a_value_set_by_hand_stays_in_the_cycle_both_ways.
    • a_change_is_saved_at_once_however_the_game_was_started now also checks that constant:0.25, picked again, is written back as it was, and that a launcher's choice back to NOT SET leaves no line.
  • That test and gray_shadow_lift_is_live_and_saved_as_a_percentage now share a lock: one sets VICTORY_MENU_FILE while the other expects it unset, and with the longer test they collided.
  • For shader changes, the wave sizes tested: no shader change.
  • cargo test passed for the crates it touches: yes. cargo test -p victory-gpu: 916 passed, 0 failed, 57 ignored. In one earlier run places_written_after_sending_are_learned (card_steps.rs, not touched) failed once; it then passed 5 times alone and in two full runs. The menu tests passed 30 runs in a row.
  • cargo clippy -p victory-gpu --all-targets -- -D warnings does not pass here: it stops in victory-shader. With --no-deps and without -D warnings, the warning counts are the same as on main and none is in menu.rs. CI on main (829188e9) also fails at its clippy step, in victory-loader.
  • cargo xtask policy fails on main too: crates/victory-loader/src/heap_sites/frame_users.rs.

Checked for overlap

  • I searched the open pull requests for the same issue and for the files this touches. Related: none cites #1401. 35 open ones touch menu.rs; of those, #1056, #1382, #1977, #1981 and #1997 have a different Menu::change, and none of the five keeps an unlisted value. #1981 and #1997 conflict with this textually (the Menu literals), and #1981 also rewrites save, so the second to merge needs a rebase and these tests run again.

🤖 Generated with Claude Code

**@⁠oVolkra** on GitHub · 2026-11-29 11:33 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/2296) `oVolkra:fix-1401-menu-hand-value` → `main` · +80 −17 · 1 files · 1 commits · closed without merging Part of #1401: the menu half of finding 4. The lighting remark and findings 1-3 are not touched. ## What it changes **Problem.** A setting started with a value its list lacks (`VICTORY_AMBIENT=1.5` or `constant:0.25` on LIGHT ESTIMATE) was shown, but Left/Right only walked the list, so after one press the value could not be picked again. **Fix**, in the code every setting goes through (`crates/victory-gpu/src/host/menu.rs`, the only file changed): - `Menu::change`: the value the run started with, if unlisted, is one more entry after the last one, in both directions. The Series S DLAA skip still works. - It is kept in a new field, `launched`. `started` could not be used: `save` overwrites it, and every change is saved at once. - This also covers a setting that started as NOT SET and does not list the empty value: it can be picked again. `save` then writes `NAME=` (unset, as the file header says). For the launcher's own choices (`VICTORY_MENU_*`) it writes no line instead, because an empty one would override the launcher's option (an empty `VICTORY_MENU_CONSOLE` reads as Series X). The value is kept for the current run only. If another one is picked and the game restarts, the file holds the new one. ## How it was tested - GPU and profile: not tried in the game. Unit tests and checks on Windows only. - Before: with the change to `change` taken out, both tests below fail. - After: both pass. - New: `a_value_set_by_hand_stays_in_the_cycle_both_ways`. - `a_change_is_saved_at_once_however_the_game_was_started` now also checks that `constant:0.25`, picked again, is written back as it was, and that a launcher's choice back to NOT SET leaves no line. - That test and `gray_shadow_lift_is_live_and_saved_as_a_percentage` now share a lock: one sets `VICTORY_MENU_FILE` while the other expects it unset, and with the longer test they collided. - For shader changes, the wave sizes tested: no shader change. - `cargo test` passed for the crates it touches: yes. `cargo test -p victory-gpu`: 916 passed, 0 failed, 57 ignored. In one earlier run `places_written_after_sending_are_learned` (`card_steps.rs`, not touched) failed once; it then passed 5 times alone and in two full runs. The menu tests passed 30 runs in a row. - `cargo clippy -p victory-gpu --all-targets -- -D warnings` does not pass here: it stops in `victory-shader`. With `--no-deps` and without `-D warnings`, the warning counts are the same as on `main` and none is in `menu.rs`. CI on `main` (829188e9) also fails at its clippy step, in `victory-loader`. - `cargo xtask policy` fails on `main` too: `crates/victory-loader/src/heap_sites/frame_users.rs`. ## Checked for overlap - [x] I searched the open pull requests for the same issue and for the files this touches. Related: none cites #1401. 35 open ones touch `menu.rs`; of those, #1056, #1382, #1977, #1981 and #1997 have a different `Menu::change`, and none of the five keeps an unlisted value. #1981 and #1997 conflict with this textually (the `Menu` literals), and #1981 also rewrites `save`, so the second to merge needs a rebase and these tests run again. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
A setting started with a value its list lacks (VICTORY_AMBIENT=1.5 or
constant:0.25 on LIGHT ESTIMATE) was shown, but after one change it could
not be picked again. The start value is now kept in `launched` (`started`
is overwritten by every save) and is one more entry of the cycle.

Part of #1401 (finding 4, the menu half).

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-29 11:38:53 +00:00
github-bot closed this pull request 2026-11-30 03:54:28 +00:00

Pull request closed

This discussion has been locked. Commenting is limited to contributors.
No reviewers
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.

Dependencies

No dependencies set

Reference
github/trustno1-coder--VIctory-NVIDIA!2296
No description provided.