F1 menu: keep a value set by hand in the setting's cycle #2296
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/2296"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by oVolkra on 2026-11-29T11:33:30Z.
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.5orconstant:0.25on 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.launched.startedcould not be used:saveoverwrites it, and every change is saved at once.savethen writesNAME=(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 emptyVICTORY_MENU_CONSOLEreads 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
changetaken out, both tests below fail.a_value_set_by_hand_stays_in_the_cycle_both_ways.a_change_is_saved_at_once_however_the_game_was_startednow also checks thatconstant:0.25, picked again, is written back as it was, and that a launcher's choice back to NOT SET leaves no line.gray_shadow_lift_is_live_and_saved_as_a_percentagenow share a lock: one setsVICTORY_MENU_FILEwhile the other expects it unset, and with the longer test they collided.cargo testpassed for the crates it touches: yes.cargo test -p victory-gpu: 916 passed, 0 failed, 57 ignored. In one earlier runplaces_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 warningsdoes not pass here: it stops invictory-shader. With--no-depsand without-D warnings, the warning counts are the same as onmainand none is inmenu.rs. CI onmain(829188e9) also fails at its clippy step, invictory-loader.cargo xtask policyfails onmaintoo:crates/victory-loader/src/heap_sites/frame_users.rs.Checked for overlap
menu.rs; of those, #1056, #1382, #1977, #1981 and #1997 have a differentMenu::change, and none of the five keeps an unlisted value. #1981 and #1997 conflict with this textually (theMenuliterals), and #1981 also rewritessave, so the second to merge needs a rebase and these tests run again.🤖 Generated with Claude Code
Pull request closed