victory switches lists the VICTORY_* switches the code reads; play names the ones it sets that none of it does (#4612 step 1) #4626
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/4626"
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 tyr0nsur on 2026-12-01T00:09:51Z.
Step 1 of #4612 (the switch registry).
What it changes
There is no list of switches. 928
VICTORY_*names are read across the crates, almost all throughstd::env::var(toggled!/asked_for!cover 36), and only F1's lines anddocs/dlss.mddescribe a few. A switch typed wrong, or kept from another fork or an old guide, is ignored with nothing said. The play logs attached to 30 issues of 2026-11-30 set 14 names that no code onmainreads (VICTORY_TEXTURE_DROP_MIPS,VICTORY_DLSS_RR,VICTORY_STAGING_PACK, ...).apps/victory/build/switches.rs(called frombuild.rs) scans thesrcfolder of each member ofcrates/*andapps/*whenvictoryis built, ascrates/victory-shader/build.rsalready does for the translator's switches. It takes every string literal that is exactly aVICTORY_name, with how it is read (toggled!,asked_for!,switch::on,env::var/var_os, or named only) and where. Nothing generated is committed. The table is made again when a member's sources change, so it cannot fall behind the code.victory switches [text]lists the names holding text, with how each is read and its first place:play: switches it is about to set that the table lacks (from the F1 menu's file or--set) are listed in the window and on a# switches not in this build's sources: ...line of the log, after the header. Each comes with the name most likely meant: at most two edits afterVICTORY_, and none on a tie. Case doesn't matter, since Windows reads environment variables that way. Prefixes the code tests withstarts_with(VICTORY_PAD_,VICTORY_MENU_) count as known. With an empty table (a build outside the workspace) nothing is reported.playsets by default (SETTINGS) is in the table. All 57 are.How each switch is read is a best effort from the call on the same line: a name read through a constant or a helper of its own shows as "named only". Telling whether a switch is live or read at the next start, and a one-line description of each, are left for the next step of #4612.
How it was tested
cargo test -p victory --locked: 95 + 1 + 2 passed, including the newswitches::tests(table sorted and filled, unknown names with their suggestion, case and prefix families,play's defaults all known).cargo clippy -p victory --all-targetswith and without--all-features,-D warnings: clean. The whole-workspace steps still stop at the findings #4296 fixes.cargo xtask policy: 466 files ok.victory switcheson this branch: 928 names (782 read as values, 70 on/off, 76 named only).Checked for overlap
apps/victory/build.rs: one line each, easy to merge in either order.Reviewed with GPT-6.2 before opening: watching each member's
srcfolder rather than whole directories, an empty table reporting nothing, the cautious wording, case folding and the stricter suggestion all came from that review.🤖 Generated with Claude Code
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.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.