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

Open
opened 2026-11-26 21:20:00 +01:00 by 4ld0 · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/ubiquitarianism/leonida/pull/2086
Author: @alexandersato0830
Created: 11/25/2026
Status: 🔄 Open

Base: main ← Head: codex/gameinput-cursor-source


📝 Commits (1)

  • 361c3ab Reset mouse delta baseline when the cursor source changes

📊 Changes

2 files changed (+38 additions, -9 deletions)

View changed files

📝 runtime/shims/gameinput.cpp (+20 -9)
📝 runtime/test/gameinput_test.cpp (+18 -0)

📄 Description

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.

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/ubiquitarianism/leonida/pull/2086 **Author:** [@alexandersato0830](https://github.com/alexandersato0830) **Created:** 11/25/2026 **Status:** 🔄 Open **Base:** `main` ← **Head:** `codex/gameinput-cursor-source` --- ### 📝 Commits (1) - [`361c3ab`](https://github.com/ubiquitarianism/leonida/commit/361c3abe61c8e76c281688ce351bbfc9d74d6928) Reset mouse delta baseline when the cursor source changes ### 📊 Changes **2 files changed** (+38 additions, -9 deletions) <details> <summary>View changed files</summary> 📝 `runtime/shims/gameinput.cpp` (+20 -9) 📝 `runtime/test/gameinput_test.cpp` (+18 -0) </details> ### 📄 Description Claimed in the coordination issue as: [RT-KEYBOARD-PAD-CURSOR-SOURCE](https://github.com/ubiquitarianism/leonida/issues/1608#issuecomment-7172790613) ### 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. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
Sign in to join this conversation.
No labels
bug
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
starred/leonida#2092
No description provided.