victory play: empty lines the F1 menu does not offer leave this release's values #4191

Closed
github-bot wants to merge 11 commits from github-bot/gh-4190 into main AGit
Owner

@⁠RustyTheDalek on GitHub · 2026-11-30 17:16 UTC · original
RustyTheDalek:fix/settings-file-leftovers → main · +861 −825 · 34 files · 11 commits · closed without merging

What it changes

victory-settings.txt keeps every VICTORY_ line it finds when the F1 menu saves (Menu::save keeps what it does not write), and victory play applies every non-VICTORY_MENU_ line over SETTINGS, an empty value removing the variable. That is right for the menu's own rows, whose empty value is their "unset" choice. For a line the menu does not offer, it is not: such lines come from other builds' menus writing the same file, and an empty one takes away the value SETTINGS gives.

On a Radeon RX 9070 XT the file held VICTORY_POOL_SMALL= and VICTORY_RIPE_BLOCKS=, written by another build's menu. Neither is a row of this menu. victory play removed both, so both ran with their code defaults instead of the 0 that SETTINGS sets (small pooled textures are off here because trees flashed in play). The start said nothing about it.

  • victory_gpu::menu_offers(var) (re-exported by victory-hle): whether the F1 menu has a row for var.
  • victory play: an empty line for a setting the menu does not offer is left out (leftover). A value still applies, whoever wrote it, and =0 still turns a switch off by hand. The README's hand edits are all either menu rows (VICTORY_MFG_UNLOCKER=) or non-empty (VICTORY_PAD_BUTTONS=...), so they keep working.
  • The start says, in the console and in the log's header, which lines were left out and which lines outside the menu set something other than this release's value (menu_file_note), so a value another build left behind can be seen in a report:
    # victory-settings.txt: empty lines the F1 menu does not offer are left out, so this release's values stay: VICTORY_POOL_SMALL, VICTORY_RIPE_BLOCKS
    # victory-settings.txt sets, over this release's own (not F1 settings; delete the line to go back): VICTORY_LEVELS_ON_DEMAND=1 (this release: 0)
    
  • Menu::save no longer writes such empty lines back, so the file cleans itself at the next save.

How it was tested

  • GPU and profile: Radeon RX 9070 XT 16 GB, Ryzen 9 5900X, 32 GB RAM, Windows 11; Series S, PC FidelityFX upscaling, no frame generation, ray tracing off.
  • Before (play log of 2026-11-30 13:04): the log header's switches had no VICTORY_POOL_SMALL and no VICTORY_RIPE_BLOCKS at all (removed by the empty lines).
  • After (play logs of 2026-11-30 14:02 and 15:00, the same settings file): the header has VICTORY_POOL_SMALL=0 and VICTORY_RIPE_BLOCKS=0, and the two note lines above.
  • New test empty_lines_the_menu_does_not_offer_leave_this_releases_values (that settings file's lines).
  • cargo test passed for the crates it touches: yes, cargo test -p victory -- play:: and cargo test -p victory-gpu --lib -- host::menu::. Clippy reports no warning on the lines this changes.

Checked for overlap

  • I searched the open pull requests for the same issue and for the files this touches. Related:
    • #2868 (for #2839) goes the other way for hand-written lines: it makes NAME= clear a variable even when it is kept from the surroundings. With this change an empty line for a setting the menu does not offer is left out instead, and NAME=0 is the way to turn such a switch off by hand. If an empty hand-written line must keep meaning "unset", the alternative is to leave victory play as it is and only stop Menu::save keeping empty lines it did not write; the start note would still show them.
    • #3274 drops one stale variable (VICTORY_FRAMEGEN_X) from settings(); this is the general case for empty lines.
    • #3618 fixes the race between the two menu tests that set where the menu saves (seen here too when host::menu:: runs on several threads).

🤖 Generated with Claude Code

**@⁠RustyTheDalek** on GitHub · 2026-11-30 17:16 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/4190) `RustyTheDalek:fix/settings-file-leftovers` → `main` · +861 −825 · 34 files · 11 commits · closed without merging ## What it changes `victory-settings.txt` keeps every `VICTORY_` line it finds when the F1 menu saves (`Menu::save` keeps what it does not write), and `victory play` applies every non-`VICTORY_MENU_` line over `SETTINGS`, an empty value removing the variable. That is right for the menu's own rows, whose empty value is their "unset" choice. For a line the menu does not offer, it is not: such lines come from other builds' menus writing the same file, and an empty one takes away the value `SETTINGS` gives. On a Radeon RX 9070 XT the file held `VICTORY_POOL_SMALL=` and `VICTORY_RIPE_BLOCKS=`, written by another build's menu. Neither is a row of this menu. `victory play` removed both, so both ran with their code defaults instead of the `0` that `SETTINGS` sets (small pooled textures are off here because trees flashed in play). The start said nothing about it. - `victory_gpu::menu_offers(var)` (re-exported by `victory-hle`): whether the F1 menu has a row for `var`. - `victory play`: an empty line for a setting the menu does not offer is left out (`leftover`). A value still applies, whoever wrote it, and `=0` still turns a switch off by hand. The README's hand edits are all either menu rows (`VICTORY_MFG_UNLOCKER=`) or non-empty (`VICTORY_PAD_BUTTONS=...`), so they keep working. - The start says, in the console and in the log's header, which lines were left out and which lines outside the menu set something other than this release's value (`menu_file_note`), so a value another build left behind can be seen in a report: ``` # victory-settings.txt: empty lines the F1 menu does not offer are left out, so this release's values stay: VICTORY_POOL_SMALL, VICTORY_RIPE_BLOCKS # victory-settings.txt sets, over this release's own (not F1 settings; delete the line to go back): VICTORY_LEVELS_ON_DEMAND=1 (this release: 0) ``` - `Menu::save` no longer writes such empty lines back, so the file cleans itself at the next save. ## How it was tested - GPU and profile: Radeon RX 9070 XT 16 GB, Ryzen 9 5900X, 32 GB RAM, Windows 11; Series S, PC FidelityFX upscaling, no frame generation, ray tracing off. - Before (play log of 2026-11-30 13:04): the log header's switches had no `VICTORY_POOL_SMALL` and no `VICTORY_RIPE_BLOCKS` at all (removed by the empty lines). - After (play logs of 2026-11-30 14:02 and 15:00, the same settings file): the header has `VICTORY_POOL_SMALL=0` and `VICTORY_RIPE_BLOCKS=0`, and the two note lines above. - New test `empty_lines_the_menu_does_not_offer_leave_this_releases_values` (that settings file's lines). - `cargo test` passed for the crates it touches: yes, `cargo test -p victory -- play::` and `cargo test -p victory-gpu --lib -- host::menu::`. Clippy reports no warning on the lines this changes. ## Checked for overlap - [x] I searched the open pull requests for the same issue and for the files this touches. Related: - #2868 (for #2839) goes the other way for hand-written lines: it makes `NAME=` clear a variable even when it is kept from the surroundings. With this change an empty line for a setting the menu does not offer is left out instead, and `NAME=0` is the way to turn such a switch off by hand. If an empty hand-written line must keep meaning "unset", the alternative is to leave `victory play` as it is and only stop `Menu::save` keeping empty lines it did not write; the start note would still show them. - #3274 drops one stale variable (`VICTORY_FRAMEGEN_X`) from `settings()`; this is the general case for empty lines. - #3618 fixes the race between the two menu tests that set where the menu saves (seen here too when `host::menu::` runs on several threads). 🤖 Generated with [Claude Code](https://claude.com/claude-code)
The settings file keeps every line it finds, and other builds' menus write
the same file. An empty line for a setting this menu has no row for took away
the value SETTINGS gives: VICTORY_POOL_SMALL= and VICTORY_RIPE_BLOCKS= from
another build put back the code defaults that victory play sets to 0. Such a
line is left out now (=0 still turns a switch off by hand), the menu no
longer saves it back, and the start says which lines were left out and which
set something other than this release's value.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-30 18:08:18 +00:00
Author
Owner

@⁠andrewpozdnakov7-jpg on GitHub · 2026-12-01 09:56 UTC · original

I cherry-picked your 50b4f71a settings fix onto current main 5fabb46e, preserving your Git authorship. The one conflict was in host/menu.rs. The rebased change keeps the new menu_offers helper and the current settings_file code. All added and removed lines match your original patch, and the comparison with main contains one commit touching five settings files. Rebased commit 64a3784101f5216d92bec1e82fdf920fbf3a34b7

Your empty_lines_the_menu_does_not_offer_leave_this_releases_values test passed on Windows/MSVC with Rust 1.98.1. The exact staged diff passed cargo xtask policy --staged.

The rebased commit is ready for your review and, if you agree with the conflict resolution, for use in this PR.

AI-assisted with OpenAI Codex.

**@⁠andrewpozdnakov7-jpg** on GitHub · 2026-12-01 09:56 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/4190#issuecomment-7307433593) I cherry-picked your `50b4f71a` settings fix onto current `main` `5fabb46e`, preserving your Git authorship. The one conflict was in `host/menu.rs`. The rebased change keeps the new `menu_offers` helper and the current `settings_file` code. All added and removed lines match your original patch, and the comparison with main contains one commit touching five settings files. [Rebased commit `64a3784101f5216d92bec1e82fdf920fbf3a34b7`](https://github.com/andrewpozdnakov7-jpg/VIctory-NVIDIA/commit/64a3784101f5216d92bec1e82fdf920fbf3a34b7) Your `empty_lines_the_menu_does_not_offer_leave_this_releases_values` test passed on Windows/MSVC with Rust 1.98.1. The exact staged diff passed `cargo xtask policy --staged`. The rebased commit is ready for your review and, if you agree with the conflict resolution, for use in this PR. AI-assisted with OpenAI Codex.
github-bot closed this pull request 2026-12-01 18:50:34 +00:00
Author
Owner

@⁠trustno1-coder on GitHub · 2026-12-01 18:46 UTC · original

Closing this as part of moving main to the texture and video-memory rework (v2026.12.01.01-test). A lot of the code changed, and this pull request no longer applies cleanly to it; it would need to be rewritten against the new main rather than rebased. Thank you for the work. If the change is still needed, please open a new pull request based on the current main.

**@⁠trustno1-coder** on GitHub · 2026-12-01 18:46 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/4190#issuecomment-7321505229) Closing this as part of moving main to the texture and video-memory rework (v2026.12.01.01-test). A lot of the code changed, and this pull request no longer applies cleanly to it; it would need to be rewritten against the new main rather than rebased. Thank you for the work. If the change is still needed, please open a new pull request based on the current main.

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!4191
No description provided.