Read and edit the first key in BOM-prefixed bindings.ini #5030
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!5030
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-5029"
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?
@RanoGames on GitHub · 2026-12-01 17:46 UTC · original
RanoGames:fix/bom-input-bindings→main· +33 −2 · 2 files · 1 commits · openWhat it changes
A UTF-8 byte-order mark at the start of
bindings.inibecomes part of the first key name in the mouse and keyboard reader. A binding such asA = Enterthen fails to parse. The F1 key-binding editor also misses that first binding and can append a second assignment when the player edits it.Skip the leading BOM when reading binding names. Preserve it and the existing line endings when the F1 editor writes the new mapping.
How it was tested
Windows x64, commit
241e240fon5fabb46e. Both tests use synthetic bindings and require no game or GPU rendering.cargo test --locked -p victory-hle --lib reads_bindings_with_a_utf8_bompassed. This covers files starting with a binding or a comment.cargo test --locked -p victory-gpu --lib edits_first_binding_in_a_utf8_bom_filepassed. The editor reads the first key and replaces it once while preserving the BOM, CRLF and the next binding.Checked for overlap
victory-settings.txtfor the launcher and general F1 settings. #1997 also handles the general menu settings file. This change covers the separatebindings.iniruntime parser and key-binding editor. #3722 concerns reloading bindings after edits and #4969 concerns key capture on focus loss.@cloph-dsp on GitHub · 2026-12-01 17:58 UTC · original
Verification (independent, AI-assisted: Hy4 flash). Windows, Rust 1.100.0 (Scoop rust-msvc), MSVC, commit-scoped shallow worktree.
Base
5fabb46eaf6ed8771321787f8871051abde69b9b, head241e240f68b644e97252d12bb98a4f0855e97e09.git diff --numstat→ crates/victory-gpu/src/host/menu.rs 23/2, crates/victory-hle/src/modules/mnk.rs 10/0.Two new tests, both absent on the base (
git grep -F <name> 5fabb46e -- .→ no match, exit 1):edits_first_binding_in_a_utf8_bom_fileandreads_bindings_with_a_utf8_bom.Note the split: they live in two different crates, so one filter cannot find both.
git diff --check "5fabb46e..241e240f"→ no output, exit 0.Results:
running 1 test,test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 1161 filtered out; finished in 0.02sand1 passed; 0 failed; 0 ignored; 0 measured; 482 filtered out; finished in 0.00s.Both write their own BOM-prefixed bindings file in a temp dir and read it back through the parser; nothing touches the title's files or a device, GPU/driver N/A. No game data.
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.