F1 menu: RESET says when the settings file could not be removed (#4939) #4978
No reviewers
Labels
No labels
AMD
audio
bug
confirmed
crash
cutscene
dlss
documentation
duplicate
enhancement
fixed-on-main
frame-generation
good first issue
help wanted
input
INTEL
invalid
lighting
linux-proton
memory
needs-info
needs-logs
needs-rebase
NVIDIA
performance
pr-diagnostics
pr-docs
pr-feature
pr-fix
pr-performance
pr-refactor
pr-tests
question
RAYTRACING
rendering
report
series-s
shaders
spam
startup
upstream
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/trustno1-coder--VIctory-NVIDIA!4978
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-4977"
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?
@RochDawid on GitHub · 2026-12-01 16:12 UTC · original
RochDawid:fix/4939-menu-reset→main· +43 −5 · 1 files · 1 commits · closed without mergingRefs #4940
What it changes
Point 4 of #4940. Since the #4635 rewrite of
menu.rs, F1's RESET ignores the result of deletingvictory-settings.txtand always showsRESET. PLAY DEFAULTS AT THE NEXT START. If the delete fails (the file is read-only, or an editor holds it open), the old settings come back at the next start while the menu said they were reset. With no folder for the file, it also said RESET.This brings back what
maindid before #4635 (#2256'sreset_at), as a small functionreset_filethe menu'sresetcalls:RESET. PLAY DEFAULTS AT THE NEXT START, as now;COULD NOT RESET THE SETTINGS FILE, and a warning in the log with the path and the error;VICTORY_MENU_FILE,VICTORY_HOMEandLOCALAPPDATAall unset):NO FOLDER FOR THE SETTINGS FILE.The strings are the ones the menu used before #4635. Nothing else in the menu changes.
The other points of #4940 are not in this pull request: point 2 is #4969, point 3 is #4943, point 5 is #4951. Point 1 (the mouse in F1) has no pull request that I found.
How it was tested
cargo testpassed for the crates it touches: not run. The new testhost::menu::tests::reset_says_when_the_settings_file_stays(removed file, missing file, a folder in the file's place, no folder) builds and links forx86_64-pc-windows-msvc(cargo xwin test -p victory-gpu --lib --no-run), but I have no Windows machine to run it on.mainhas had since #4635, which #4680 fixes. With #4680's commit applied on top (locally, not pushed),cargo clippy --workspace --all-targets --locked -- -D warningsand the same with--all-featurespass for--target x86_64-pc-windows-msvc. Run on macOS throughcargo xwinwith Rust 1.98.1, at733d4ad5.cargo xtask policy --staged: 1 file ok.checkjob fails at Clippy on those inherited findings, not on this change.Checked for overlap
reset). Other open pull requests that changehost/menu.rs(for example #4765, #4712) do not changereset. #4680 for the inherited Clippy findings.@andrewpozdnakov7-jpg on GitHub · 2026-12-01 16:26 UTC · original
I checked
733d4ad5on Windows with Rust 1.98.1. A small standalone harness ran the exactreset_filefunction and the test from this PR. The PR's test and one Windows-specific check both passed.The second check held a synthetic settings file open without delete sharing. On
5fabb46e, the original RESET method displayed success while the file stayed in place. With this PR, the method reportedCOULD NOT RESET THE SETTINGS FILEand preserved the file bytes. Releasing the handle and retrying removed the file and returned the success message.This exercised the filesystem behavior in isolation. I didn't run the full crate suite or open F1 in-game.
@cloph-dsp on GitHub · 2026-12-01 17:43 UTC · original
Verification (independent, AI-assisted: Hy4 flash). Windows, Rust 1.100.0 (Scoop rust-msvc), MSVC, commit-scoped shallow worktree.
Base
5fabb46eaf6ed8771321787f8871051abde69b9b, head733d4ad5beda357c1be4d4e2a382601acfc3c78d.git diff --numstat→ crates/victory-gpu/src/host/menu.rs 43/5.The test is new on the base:
→ no match, exit 1.
git diff --check "5fabb46e..733d4ad5"→ no output, exit 0.Result:
running 1 test,test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 1161 filtered out; finished in 0.01s.What it covers:
reset_fileis a pure path -> message function, and the test walks all four outcomes on a temp dir — absent file (reset already), present file (removed, same message), a directory in the file's place (theremove_filefailure arm, asserting the "COULD NOT RESET" note and that the directory is left alone), andNone(no settings folder). That the failure arm is exercised through a realremove_fileerror rather than a mock is the useful part; the menu'snotewiring itself is not asserted, only the string returned.No settings file of the real app, no title, no device; GPU/driver N/A. No game data.
@RochDawid on GitHub · 2026-12-01 18:25 UTC · original
Closing:
mainhas this now.f5c67e18put the F1 menu back on the paged menu, whoseresetagain reports a delete that failed asCOULD NOT RESET THE SETTINGS FILE(reset_at, with its testreset_settings_reports_errors_and_accepts_missing_file). Thanks for the two Windows checks above.Pull request closed