fix(input): smooth magic-mouse pointer on native screens - #2363
Conversation
Absolute IECLASS_POINTERPOS events from the virtual mouse driver are serviced by the guest at a low rate, so the native-screen pointer moved in visible multi-pixel steps while the host delivered smooth positions. Feed the delta between consecutively delivered absolute positions into the relative mouse pipeline (serviced every vsync like normal mouse input); the absolute events still anchor the exact position, so there is no double movement. Fixes #2279
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: da193433ff
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Multi-mouse setups map each host mouse to its own device index; the native-screen delta injection always dispatched through mice[0]. Record the device that delivered the position and select its mapping for the relative events, so the injected movement follows the same port bindings as the originating device. Wrap all added code in ifdef AMIBERRY guards and keep shared lines byte-identical to upstream WinUAE so future core merges do not clobber the additions.
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 1520619c40
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
The disabled-device branch of setmousestate() still delivers absolute positions through mousehack_helper(), but the synthesized relative events must not bypass the user's disabled-device setting. Gate the native-screen delta injection on the originating device being enabled.
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: cfd09b72ba
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Per-axis ID_FLAG_INVERT would reverse only the synthesized relative delta while the absolute IECLASS_POINTERPOS anchor stays un-inverted, moving the pointer opposite to the host between guest driver updates. The delta is already exact in the absolute coordinate space, so drop the inversion from the native-screen injection.
|
@codex review |
|
Codex Review: Didn't find any major issues. 🎉 Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
Fixes #2279.
Changes proposed in this pull request:
IECLASS_POINTERPOSevents move the pointer — and the guest services those at a low rate (frame-by-frame analysis of the issue's slow-motion recording shows pointer updates only every ~100 ms, in 4–11 px steps, while normal mouse mode is smooth). Normal mouse input moves through the hardware mouse counters, which are serviced every vsync.TABLET_MOUSEHACK+ driver alive + native screen + both positions valid; RTG and tablet modes are untouched, and the delta bypasses theinput_mouse_speedscaling because it is already exact Amiga-space.Validated by a full Linux build (Debian trixie, SDL3) that compiles clean and runs, and by tracing the delivery path (
inputdevice.cppandfilesys.asm) against upstream WinUAE, which is identical here. Guest-side visual confirmation needs a Kickstart ROM and an interactive Workbench session, so a retest on the reporter's setup would be welcome.@midwan