Repository navigation
Input: add mouse camera control to the fallback pad - #33
Merged
Merged
Conversation
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
This was referenced Nov 25, 2026
devin-ai-integration Bot
added a commit
that referenced
this pull request
Nov 25, 2026
…1430/#33) (#50) * input: keyboard stand-in engagement + mouse camera control (#1430/#33) Two cherry-picks that apply clean on the fxceless base: - 70f3bbc (upstream #1430): virtual or idle XInput pads no longer disable keyboard controls; real input outside the deadzones engages pad mode, fallback keys regain control once host pads go idle. - d34c4c9 (re-port #33): the mouse as the stand-in pad's camera under VICTORY_MOUSE — movement as right-stick deflection (cursor re-centred per poll while focused), left/right buttons as triggers. Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> * input: mouse fixes — decay accumulator, dialog release, left-stick threshold - Polls outnumber the title's frames, so movement sliced over several polls mostly never reached a frame: the stick now reports a decaying accumulator, spreading the movement instead of dropping it. - Re-centring pauses while a window other than the one capture started on is in front: the text-entry dialog shares the process, so the focus check alone passed it and the cursor could not reach its buttons. - The left stick engages pad mode at XInput's left-thumb threshold (7849) instead of the right stick's. Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> * input: drop buffered mouse movement on focus loss, decay by time - Switching windows mid-turn no longer sends the buffered movement to the camera on return; the accumulator clears with capture. - The capture window re-latches once the window it started on closes, so a startup dialog cannot hold capture forever. - The accumulator halves per 100 ms of wall time instead of per poll: at high poll rates the per-poll halving erased movement long before the title's slow frames could read it. Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> * input: mouse velocity as an exponential moving average Replaces the decaying sum, which saturated on steady sweeps and kept residual motion alive: the stick now reports an EMA (half-life 50 ms of wall time) of per-poll deltas. Steady motion converges to the full per-poll speed, flicks smooth out, and the estimate reaches zero within a few hundred ms of the mouse stopping — brief enough not to steal pad mode back from a controller. Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> * input: mouse speed in pixels per second, poll-interval independent The EMA now averages velocity (delta divided by the measured poll interval, floor 1 ms) instead of raw per-poll distances: the same hand speed yields the same camera turn regardless of how long polls take. Full stick at 4000 px/s, scaled by VICTORY_MOUSE sensitivity. Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> --------- Co-authored-by: stoltembergg <stoltembergg@gmail.com> Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
devin-ai-integration Bot
pushed a commit
that referenced
this pull request
Nov 25, 2026
input: keyboard stand-in engagement + mouse camera control (re-port #1430/#33)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
VICTORY_MOUSE=1(or a numeric sensitivity) makes mouse movement drive the keyboard stand-in pad's right stick.Validation
cargo fmt --all -- --checkcargo run --locked --quiet --package xtask -- policycargo test --locked -p victory-hle --lib modules::gameinput::tests::the_mouse -- --nocaptureCARGO_FEATURE_PURE=1 RUSTFLAGS='-D warnings' cargo check --locked -p victory-hle --target x86_64-pc-windows-msvcCARGO_FEATURE_PURE=1 RUSTFLAGS='-D warnings' cargo clippy --locked -p victory-hle --all-targets --target x86_64-pc-windows-msvcNotes