Repository navigation
input: keyboard stand-in engagement + mouse camera control (re-port #1430/#33) - #50
Merged
Merged
Conversation
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>
Contributor
Author
|
I'll fix CI failures and address comments from users with write access. I'll skip comments containing "(aside)".
|
…reshold - 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>
- 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>
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>
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>
Contributor
Author
There was a problem hiding this comment.
Devin Review found 9 findings. Devin automatically fixed all 9 findings.
Fixed by Devin (9)
- Mouse capture and rendering select windows separately — Fixed the startup-dialog case: capture re-latches to the current foreground window once the window it latched on no longer exists (IsWindow fails), so a dialog in front at startup cannot permanently capture.
- Slow frames still miss mouse motion — Fixed: decay is now time-based (halves per 100 ms) instead of per-poll, so movement survives the slow frames regardless of poll rate while still fading.
- Right-stick threshold on left stick — Fixed: left axes now compare against XInput's left-thumb deadzone (7849), right axes keep 8689.
- Old camera movement after refocus — Fixed: the accumulator now clears together with mouse_centred on focus loss or foreign foreground window — no stale movement after refocus.
- Stale mouse motion steals controller mode — Fixed by redesign: EMA replaces the decaying sum — the estimate converges to zero geometrically (50 ms half-life) once the mouse stops, so residual motion is negligible within ~300 ms.
- Slow mouse sweeps max out camera speed — Fixed by redesign: the EMA converges to the steady per-poll speed rather than accumulating without bound — stick deflection is proportional to mouse speed, faster sweeps no longer clip to the same speed.
- Lost camera movement between frames — Fixed: the stick now reports a decaying accumulator of per-poll deltas, so movement sliced over many polls reaches the frame spread out rather than being dropped.
- Mouse capture in text entry — Fixed: re-centring pauses whenever the foreground window differs from the window capture started on — the text-entry dialog (same process) no longer traps the cursor.
- Camera sensitivity varies with poll timing — Fixed: the EMA now averages true velocity (delta divided by measured poll interval) in px/s, so camera response no longer depends on poll timing.
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.
Two cherry-picks onto the fxceless base — they applied clean since the fxceless input module is close to the old tree:
VICTORY_MOUSE— movement turns the right stick (cursor re-centred each poll while focused, sensitivity configurable), left button as right trigger, right button as left trigger.This matters for actually playing/testing the game with keyboard+mouse — camera control was impossible before.
Validation: clippy
-D warningsclean (incl. tests), 10 gameinput tests pass (incl. the engagement truth-table test and both mouse tests).Written by Devin
Open in Devin Desktop: https://app.devin.ai/desktop/session/39a24dfe2c184165b42b2108a96286b6?variant=devin
Requested by: @Personed
🟢 Devin fixed all 9 findings · Follow Devin's work