mnk: allow empty bindings in bindings.ini, print reload errors, and fix F1/AZERTY notes #672
No reviewers
Labels
No labels
AMD
audio
bug
confirmed
crash
cutscene
dlss
documentation
duplicate
enhancement
fixed-on-main
frame-generation
hle
input
INTEL
lighting
linux-proton
memory
MULDER
needs-info
needs-logs
needs-rebase
NVIDIA
performance
post-merge
pr-diagnostics
pr-docs
pre-merge
pr-feature
pr-fix
pr-performance
pr-refactor
pr-tests
question
RAYTRACING
relevance
high
relevance
low
relevance
medium
relevance
very-high
rendering
report
roadmap-proposal
saves
series-s
shaders
startup
status
blocked-by-rework
status
needs-test-report
status
needs-triage
status
ready-for-review
status
stale
status
superseded
status
wip
tools
ui
upstream
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
TrustNo1/Darner!672
Loading…
Reference in a new issue
No description provided.
Delete branch "MasterWolf/Darner:pr/post-merge-bindings-ini-unbind-and-docs"
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?
Not run in the game (verified via
cargo build,cargo test, andcargo clippyond8e39a4; self-contained parser, console logging, and defaultbindings.inicomment fix).Refs #655
Contributor role (optional)
What it changes
post-merge: read from the code (crates/darner-hle/src/modules/gameinput/mnk.rsandbindings.ini) while investigating #655:mnk::parsesplits each binding value on,without skipping empty items (input.split(',').map(|k| key(k)...)). Leaving a binding empty to unbind a control (e.g.RB =orLookUp =) or leaving a trailing comma fails parsing of the entirebindings.inifile.bindings.inifails to parse on load or hot-reload,mnk::configonly emitstracing::warn!(unlike theprintln!("bindings ...")lines used when writing the file), so users editingbindings.iniget no obvious console feedback that their edits were rejected and the previous bindings were kept.bindings.iniheader still refers toF10: Controls = mouse and keyboardinstead ofF1, CONTROLS: MOUSE AND KEYBOARD, and does not warn AZERTY users to keepW/A/S/Drather than replacing them withZ/Q/S/D(replacingMoveLeft = AwithMoveLeft = Qmaps to physical US-Q, i.e.Aon AZERTY).This PR:
mnk::parseso empty values unbind a control and trailing commas parse cleanly, while unknown control names and invalid key names still returnErr.bindings ...lines on parse failures (load/reload) and successful hot-reloads inmnk::config.bindings.inicomments (F1, CONTROLS: MOUSE AND KEYBOARD, AZERTY positional-key note, and empty-value unbinding note).empty_binding_unbinds_and_trailing_comma_parses.How it was tested
d8e39a4(on top ofpost-merge28a9b42)cargo build --offline -p darner— passed (0 errors)cargo test --offline -p darner-hle --lib modules::gameinput::mnk—7 passed; 0 failed(including newempty_binding_unbinds_and_trailing_comma_parses)cargo clippy --offline -p darner-hle --tests— passed (0 warnings indarner-hle)cargo check --offline --workspace— passedbindings.iniparsing, console diagnostics, and comments; no runtime default or performance claim changed).cargo build,cargo test,cargo clippy,cargo check --workspaceChecklist
post-merge.Checked for overlap
[pr-fix][input] mnk: allow empty bindings in bindings.ini, print reload errors, and fix F1/AZERTY notesto mnk: allow empty bindings in bindings.ini, print reload errors, and fix F1/AZERTY notesView 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.