Fix F1 settings persistence, reset state sync, and launcher script parity #2868
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/2868"
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 steven-seagull27 on 2026-11-29T18:22:03Z.
Fixes #2775 and addresses #2839.
Summary
1. Clear explicitly unset F1 settings even when listed in
KEPT(#2839)apps/victory/src/play.rs: Track non-VICTORY_MENU_variables explicitly cleared withNAME=invictory-settings.txtor--set(explicitly_unset+env_removals), and remove them from the child environment case-insensitively even when listed inKEPT(such asVICTORY_ADAPTERreset back toAUTOandVICTORY_VEHICLE_AUTO_CENTERtoggled backOFF). IntactKEPTpath/environment overrides still survive when not explicitly cleared.scripts/play-foxhound.ps1: Track explicitly cleared keys fromvictory-settings.txtand-Moreand remove them fromEnv:even if present in$paths(includingVICTORY_ADAPTER).VICTORY_FORCE_MFG_RTX40(play.rs) untouched so there is no conflict with #2576.2. Launcher script parity for
VICTORY_MENU_S_RESandfsr4(#2839)scripts/play-foxhound.ps1: Read and applyVICTORY_MENU_S_RES(Series S picture size) and propagate it toVICTORY_MENU_S_RES/VICTORY_DLSS_MODEmatchingapps/victory/src/play.rs. Accept'fsr4'in-FgTypeandVICTORY_MENU_FG_TYPE, and wireVICTORY_PC_FSR=1,VICTORY_FSR_FRAMEGEN=4,VICTORY_FIDELITYFX_DIR, andVICTORY_MENU_FRAMEGENto matchplay.rs.scripts/play-gta6-framegen.ps1: Accept'fsr4'inGTA6_FG_TYPEandVICTORY_MENU_FG_TYPEso FSR 4 selection persists cleanly across launches.3. Fix F1 menu
reset()state sync andchange_and_save()note preservation (#2839)crates/victory-gpu/src/host/menu.rs:reset()now restoresself.valuestoITEMSplay defaults, applies changed live settings immediately, clears any inheritedVICTORY_ADAPTERoverride, and resetsself.started = self.values.clone()so subsequent edits before restarting write an accurate diff.change_and_save()preserves specific non-empty notes set bychange()(such as"RESTART REQUIRED TO ENABLE FRAME GENERATION") whensave()succeeds instead of clobbering them with"SAVED. APPLIES AT THE NEXT START".4. Add
"SAVE AND CLOSE GAME"F1 menu action (#2775)crates/victory-gpu/src/host/menu.rs: Added"SAVE AND CLOSE GAME"(withABOUT_SAVE_CLOSEfitting withinCOLUMNSusing existing font glyphs) alongside the other save actions while keeping"CLOSE"(close menu overlay) as the last row. On Enter, it callsself.save()and, if saving succeeds, logs and exits immediately viaTerminateProcess(GetCurrentProcess(), 0)(matchingrestart_asso Streamline DLL unload never hangs).Verification
cargo test --locked -j 2 -p victory-gpu --lib -- menu --nocapture --test-threads=1— 17 passed, 0 failed (including new synthetic unit tests forreset(),change_and_save()note preservation, andsave_and_close_game()subprocess exit + failure path).cargo test --locked -j 2 -p victory --bin victory -- --test-threads=1— 79 passed, 0 failed (including new synthetic unit test forexplicitly_unset/env_removalsoverridingKEPTcase-insensitively).cargo clippy --locked -j 2 -p victory-gpu -p victory --bins --tests— 0 warnings in touched files.scripts/play-foxhound.ps1andscripts/play-gta6-framegen.ps1— passed.git diff --check— clean.Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by steven-seagull27 on 2026-11-29T20:41:24Z.
Rebased onto
origin/main(cec481f4) and narrowed scope now that"SAVE AND CLOSE GAME"and the bottom save-row ordering landed upstream incec481f4.Retained changes (
2b7bb1c3)NAME=unsets overridingKEPTinapps/victory/src/play.rsandscripts/play-foxhound.ps1(addresses#2839).VICTORY_MENU_S_RESand'fsr4'inscripts/play-foxhound.ps1andscripts/play-gta6-framegen.ps1.crates/victory-gpu/src/host/menu.rs:reset()syncsvalues, live settings,VICTORY_ADAPTER, andstarted;change_and_save()preserves non-empty notes set bychange()on save.KEPTunsets (play.rs),reset()state sync, andchange_and_save()note preservation (menu.rs).Verification
cargo test --locked -j 3 -p victory— 83 passed, 0 failed.cargo test --locked -j 3 -p victory-gpu --lib -- menu --test-threads=1— 16 passed, 0 failed.cargo clippy --locked -j 3 -p victory -p victory-gpu --all-targets— 0 warnings in touched files.scripts/play-foxhound.ps1andscripts/play-gta6-framegen.ps1— passed.git diff --check— clean.Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by andrewpozdnakov7-jpg on 2026-11-30T12:10:15Z.
I reproduced one #2839 persistence case on release/main
41adb551and repeated it with2b7bb1capplied. The same fixture executes the checked-in PowerShell settings read,-Morehandling and environment update statements with a generated settings file and a temporary process environment.VICTORY_ADAPTER=-More VICTORY_ADAPTER=-More victory_adapter=reselectedThe fixture also confirmed that the unrelated inherited
VICTORY_STREAMLINE_DIRvalue stayed present in all eight runs. Both updated PowerShell scripts parsed successfully.I applied #2256
9b2b3ffand this PR on current main in both orders. Both produced tree006559cf6373. On the combined tree 19 F1 menu tests and 29playtests passed on Windows, including the save-failure and reset cases. These checks use generated settings and cover launcher and menu logic.The PR check stopped in Clippy on
victory-loader's unusedunwind_copy, which also reproduces on clean main.AI-assisted with OpenAI Codex.
Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by steven-seagull27 on 2026-11-30T18:33:48Z.
Thanks
@andrewpozdnakov7-jpgfor reproducing#2839and verifying the persistence/unset matrix and#2256combination!Rebased cleanly onto latest
main(e1251c31->133e16a5):scripts/play-nvidia.ps1(renamed fromscripts/play-foxhound.ps1in84bd61e2), keepingVICTORY_MENU_S_RESparity and explicitNAME=unsets across$pathsand the play shader-key defaults (#4067), while dropping theplay-nvidia.ps1fsr4hunks already merged upstream (f580ddb7).Menu::reset_atstate sync (values, live env switches,VICTORY_ADAPTER,started) andMenu::change_and_savenote preservation with#2256's save/reset error handling andtest_env_lockserialization incrates/victory-gpu/src/host/menu.rs.Verification
cargo test -p victory-gpu --lib -- menu— 30 passed, 0 failed.cargo test -p victory --bin victory— 92 passed, 0 failed.cargo clippy -p victory-gpu -p victory --lib --bins --tests— 0 warnings in touched files.cargo run -p xtask -- policy --staged& PowerShell AST parse onscripts/play-nvidia.ps1/scripts/play-gta6-framegen.ps1— passed.Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by andrewpozdnakov7-jpg on 2026-12-01T15:11:40Z.
On
a7bbce0e, the environment cleanup matches names without case, but the launcher settings map still matches--setkeys by case. With a savedVICTORY_ADAPTER,--set victory_adapter=removes the inherited value and then the saved setting puts the adapter back. Mixed-case repeated assignments can also preserve an earlier value.21fd0fe0 normalizes Victory switch names before applying the command-line overrides. A focused Windows fixture used the exact settings and environment code with synthetic values. The saved adapter now clears, and the last assignment wins in either case order. Clearing an inherited adapter and running without an override behaved the same before and after. The staged asset policy passed.
Please keep the Git author on cherry-pick or rebase, or add
Co-authored-by: andrewpozdnakov7-jpg <[email protected]>if folding the change in.AI-assisted with OpenAI Codex.
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.