Reset the mouse baseline when the cursor source changes (RT-KEYBOARD-PAD-CURSOR-SOURCE) #2086

Open
github-bot wants to merge 1 commit from github-bot/gh-2086 into main AGit
Owner

@⁠alexandersato0830 on GitHub · 2026-11-25 19:51 UTC · original
alexandersato0830:codex/gameinput-cursor-source → main · +38 −9 · 2 files · 1 commits · open

Claimed in the coordination issue as: RT-KEYBOARD-PAD-CURSOR-SOURCE

What and why

The first poll after raw input starts can subtract a screen cursor coordinate from a raw-motion counter. That difference can appear as a full stick movement while the mouse is stationary. Select one cursor source for each poll and establish a new baseline when the source changes. Accumulated stick motion continues its normal decay.

Tested

  • Windows 11, MSVC 19.51 and pinned SDL 3.4.20. Main 0afcf9b failed all three source-switch checks. The patched gameinput and gameinput_script CTests passed with 377 checks, zero failures.
  • The test switches between two synthetic position sources with different origins, verifies real movement on the new source, and verifies no extra movement when switching back. A merge-tree check with #2082 succeeded.
  • Verified git diff --check and the source-only check.

GPUs tested: n/a. The tests use virtual pads.

AI-assisted: yes.

  • Based on current main.
  • One topic.
  • Uses source and synthetic fixtures.
**@⁠alexandersato0830** on GitHub · 2026-11-25 19:51 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/2086) `alexandersato0830:codex/gameinput-cursor-source` → `main` · +38 −9 · 2 files · 1 commits · open Claimed in the coordination issue as: [RT-KEYBOARD-PAD-CURSOR-SOURCE](https://git.gtahub.st/github/ubiquitarianism--leonida/issues/1608) ### What and why The first poll after raw input starts can subtract a screen cursor coordinate from a raw-motion counter. That difference can appear as a full stick movement while the mouse is stationary. Select one cursor source for each poll and establish a new baseline when the source changes. Accumulated stick motion continues its normal decay. ### Tested - Windows 11, MSVC 19.51 and pinned SDL 3.4.20. Main `0afcf9b` failed all three source-switch checks. The patched `gameinput` and `gameinput_script` CTests passed with **377 checks, zero failures**. - The test switches between two synthetic position sources with different origins, verifies real movement on the new source, and verifies no extra movement when switching back. A merge-tree check with #2082 succeeded. - Verified `git diff --check` and the source-only check. GPUs tested: n/a. The tests use virtual pads. AI-assisted: yes. - [x] Based on current `main`. - [x] One topic. - [x] Uses source and synthetic fixtures.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 10:17:19 +00:00
This pull request can be merged automatically.
This branch is out-of-date with the base branch
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin '+refs/pull/2086/head:github-bot/gh-2086'
git switch 'github-bot/gh-2086'

Merge

Merge the changes and update on Forgejo.
git switch 'main'
git merge --no-ff 'github-bot/gh-2086'
git switch 'github-bot/gh-2086'
git rebase 'main'
git switch 'main'
git merge --ff-only 'github-bot/gh-2086'
git switch 'github-bot/gh-2086'
git rebase 'main'
git switch 'main'
git merge --no-ff 'github-bot/gh-2086'
git switch 'main'
git merge --squash 'github-bot/gh-2086'
git switch 'main'
git merge --ff-only 'github-bot/gh-2086'
git switch 'main'
git merge 'github-bot/gh-2086'
git push origin 'main'
This discussion has been locked. Commenting is limited to contributors.
No description provided.