[pr-fix][input] Native mouse: Mouse4, Mouse5, WheelUp and WheelDown in bindings.ini press their bindings #405
Loading…
Reference in a new issue
No description provided.
Delete branch "elgibbone/native-mouse-bindings"
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?
What it changes
bindings.initakesMouse4,Mouse5,WheelUpandWheelDown, and F1's KEY BINDINGS lets the player bind them, but with the native mouse on (the default for mouse and keyboard) none of them presses anything in play:mnk::sample, the only reader of them, runs only whenDARNER_NATIVE_MOUSE=0(fallback_for_seat).Host::keysreads0x08..=0xFE, so the mouse buttons never reach the stand-in pad, andoverlay_mouse_mappinggives only left, right and middle a fixed use.WM_MOUSEWHEELstill queues notches inmnk::wheel_scroll, but nothing polls the queue, so it fills to 16 and stays full.What this does, on the native mouse path in play (
InputMode::GameplayandRadialWheel):mnk::native_mouse_keysreturns Mouse4 and Mouse5 while held (the async state, or the message loop'sLATCHEDrecord, asmnk::samplereads them) and the wheel notch being pressed, polled from the same queue and pulse timing asmnk::sample.mouse_key_padreads those keys against the file's buttons, triggers and stick keys withbound_only_pad, soLB = Mouse4,RT = WheelUporMoveUp = Mouse5work as they do withDARNER_NATIVE_MOUSE=0, driving rules included. That pad is merged into the overlay with the fixed left, right and middle mapping.mnk::forget_wheel). Notches that scrolled a menu or the weapon wheel don't pressWheelUporWheelDownlater.mnk::sampleand the native path share one wheel clock (clock_ms).Not changed: left, right and middle keep their fixed use on the native path. A
bindings.iniline that movesMouse1…Mouse3to another control is still not followed there (the driver seat's fixed shoulders depend on it). Mouse4 and Mouse5 in menus and on the map keep their current UI handling. The shippedbindings.inibinds none of these keys, so nothing changes for a player who hasn't bound them.How it was tested
7f40324(one commit on mainf3840d7)mouse4_mouse5_and_the_wheel_press_their_bindings_on_the_native_path(a button, a trigger from the wheel, the left stick and the driving rule from Mouse5, and Mouse1's binding left to the fixed mapping).bindings.inibinds none of these keys).cargo clippy --workspace --all-targets --locked -- -D warningsclean, the same with--all-featuresclean,cargo xtask policypassed,cargo test -p darner-hle --locked497 passed, 0 failed, 15 ignored,cargo test -p darner --locked160 passed, 1 ignored. Not the wholecargo test --workspace.LATCHEDrecord are covered by the existingmnkcode and tests, not by a new test on the native path.Checklist
main.docs/asset-policy.md.Checked for overlap
gameinput.rsandmnk.rs(stand_in_pad,fallback_for_seat, the layout read inmnk::sample); this one merges with it without conflicts (git merge-tree). #399 and #402 also changegameinput.rs; no conflict with either.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.