mirror of
https://github.com/ubiquitarianism/leonida.git
synced 2026-11-26 23:30:53 +01:00
[PR #2082] Keep keyboard-pad mouse deltas in range (RT-KEYBOARD-PAD-MOUSE-DELTA) #2087
Labels
No labels
bug
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
starred/leonida#2087
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
📋 Pull Request Information
Original PR: https://github.com/ubiquitarianism/leonida/pull/2082
Author: @alexandersato0830
Created: 11/25/2026
Status: 🔄 Open
Base:
main← Head:codex/gameinput-mouse-delta📝 Commits (1)
8b3db05Keep virtual gamepad mouse deltas in range📊 Changes
2 files changed (+29 additions, -3 deletions)
View changed files
📝
runtime/shims/gameinput.cpp(+7 -3)📝
runtime/test/gameinput_test.cpp(+22 -0)📄 Description
Claimed in the coordination issue as: RT-KEYBOARD-PAD-MOUSE-DELTA
What and why
A very large mouse delta can exceed the 32-bit Windows
longrange before the right-stick value is clamped. That can send the stick in the opposite direction. Round into a 64-bit result before clamping. Subtract the wrapping input counters in unsigned arithmetic so a small move across the 32-bit boundary keeps its magnitude and direction.Tested
5da72d1, the new fake-cursor cases failed for both a positive and a negative three-million-count jump.gameinputandgameinput_scriptCTests passed with 377 checks, zero failures. Coverage includes the large deltas and a four-count move across the raw counter boundary.git diff --checkand the source-only check.GPUs tested: n/a. The tests use virtual pads and a synthetic cursor source.
AI-assisted: yes.
main.🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.