Keep the first setting in UTF-8 files with a BOM #4796
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!4796
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-4795"
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?
@andrewpozdnakov7-jpg on GitHub · 2026-12-01 08:55 UTC · original
andrewpozdnakov7-jpg:codex2/fix/settings-utf8-bom→main· +19 −3 · 2 files · 1 commits · openWhat it changes
Windows PowerShell can write a UTF-8 byte-order mark at the very start of
victory-settings.txt. When the file starts directly with a setting,victory playskips that setting. Saving another option from F1 also drops the untouched first setting from disk.Both readers now skip one leading BOM before splitting the lines. A settings file without a BOM follows the same parsing rules.
How it was tested
v2026.11.30.03andmain5fabb46eskipped a first-line 60 FPS cap. The Windows/MSVC regression saw 33,333 µs instead of 16,667 µs. The original F1 save methods also removed that line when saving a different DLSS setting.b27bb496629842ad794e0caa31dc626066ed1f63applied the 16,667 µs cap with and without a BOM. An isolated check of the F1 save method kept the first line while updating the other setting in both files.cargo test --offline --locked --jobs 2 -p victory: 92 unit and 3 integration tests passed on Windows x64 / MSVC.cargo xtask policy --stagedpassed for both files.mainhas five existing Clippy errors. Main CI / check · Shared lint fix #4708Checked for overlap
Please retain the Git author on cherry-pick or rebase, or add
Co-authored-by: andrewpozdnakov7-jpg <[email protected]>if folding the change into another commit.AI-assisted with OpenAI Codex.
@cloph-dsp on GitHub · 2026-12-01 12:38 UTC · original
Verification of this PR (AI-assisted: Hy4 flash), source only, no game data.
Windows / rustc 1.100.0 / MSVC. Worktree at head
b27bb496, dedicated per-worktree CARGO_TARGET_DIR (D:\Victory-Contrib\NVIDIA-Contrib\target-4795), never shared.Negative control on base
5fabb46e:git grep -F menu_file_bom_keeps_the_first_setting 5fabb46e -- .-> exit 1 (test is new)Whitespace:
git diff --check 5fabb46e..b27bb496-> exit 0, clean.->
test play::tests::menu_file_bom_keeps_the_first_setting ... ok/test result: ok. 1 passed; 0 failed; 91 filtered out.Note for the author: the test lives in the binary crate
apps/victory/src/play.rs, so it needs-p victory --bin victoryand theplay::tests::prefix;-p victory-gpu --libgivesrunning 0 tests(a false negative, not a failure).GPU/driver: N/A (file-parsing test, no device).
Verdict: PASS for the new synthetic test on this host.
View command line instructions
Manual merge helper
Use this merge commit message when completing the merge manually.
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.