mnk: add opt-in chords, CapsLock, Driver*/Flight* bindings & aim wheel zoom #584
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
3 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
TrustNo1/Darner!584
Loading…
Reference in a new issue
No description provided.
Delete branch "aowu/Darner:pr/mnk-bindings-extensions"
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?
Summary
Extends
bindings.iniwith 100% opt-in, backwards-compatible PC mouse & keyboard capabilities while leaving the shipped defaultbindings.iniand all stock behavior completely unchanged unless configured:CapsLockkey name: AcceptsCapsLock/Caps(0x14) inbindings.ini.+syntax): Bind a single PC key to a gamepad chord such asLS+RS = CapsLock(focus mode) orLT+DpadLeft = E(shoulder swap), with automatic aim lead-in when anLT+...chord is pressed from hipfire.DriverHorn: extraLShorn/nitrous keyDriverHeadlights: fixed 80 ms short-pressBpulse (never triggers vehicle duck)DriverDuck+DriverDuckMode = toggle | hold: dedicated vehicle duck with a 420 ms anti-headlight floor so rapid taps never flash headlightsFlightPitchDown,FlightPitchUp,FlightYawLeft,FlightYawRight,FlightRollLeft,FlightRollRight,FlightThrottleUp,FlightThrottleDown,FlightFire,FlightGearFlight*key is configured inbindings.ini; otherwise stockAircraftPilotbehavior is untouched.LT/RMB) andWheelUp/WheelDownare not explicitly bound elsewhere, scrolling pulsesDpadUp/DpadDownfor scope zoom.Backwards Compatibility
bindings.iniis not modified.mnk::apply_native_extensionson top ofstand_in_pad, preserving AZERTY layout handling,DARNER_BINDINGS_ONLY=1,DARNER_WHEEL_HOLD=1, and all existing unit tests unmodified.Verification
chords_and_capslock_and_aim_wheel_zoom_workopt_in_driver_overrides_separate_headlights_and_duckopt_in_flight_overrides_only_activate_when_configuredcargo test -p darner-hle --lib gameinputpasses (116 passed, 0 failed).Heads-up on overlap with two open PRs of mine, so whichever lands second knows what to adapt:
Sensitivity) changes the same lines inmnk.rs: it adds anexplicit_sensitivityfield next tosensitivityinstruct Bindings, sets it inparse(theBindings { .. sensitivity: 0.045 }initializer and theSensitivitybranch), and addsconfig_at()/sensitivity_with_count()aroundconfig(). This PR adds fields at the same spots, so the two will conflict in text. The fix is mechanical: keep both sets of fields.Mouse4,Mouse5,WheelUp,WheelDownpress their bindings) covers part of the same ground: on the native mouse path it reads those keys withmnk::native_mouse_keysand presses their plain bindings throughmouse_key_padingameinput.rs, reading the same wheel queue, which it clears outside gameplay and while the weapon wheel is open (mnk::forget_wheel). Here,apply_native_extensions_fromreads5 | 6andWHEEL_UP | WHEEL_DOWNthrough its ownwheel().poll()for chords, theDriver*/Flight*keys and the aim zoom. With both merged, two places would read the wheel queue, so it is worth checking that a scroll reaches each of them once. It would be simpler if one built on the other: this PR reading the native keys through #405'snative_mouse_keys, or #405 rebased on top of this one.Neither of mine is merged yet. I'm happy to rebase mine on this PR if it goes in first.
Test needed — commit
9518e7ab; what to check: the change described aboveEvidence to post: card + driver, settings, commit tested, before/after (switch off vs on, two runs each), fps median and p99, and one line saying you looked at the picture.
Reply
testingto take this run; it's free again after 24 h with no results.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.