Fix raw input mouse position jumping after window state changes#18586
Merged
sonninnos merged 1 commit intolibretro:masterfrom Jan 8, 2026
Merged
Fix raw input mouse position jumping after window state changes#18586sonninnos merged 1 commit intolibretro:masterfrom
sonninnos merged 1 commit intolibretro:masterfrom
Conversation
Collaborator
|
Please keep the code C89 compliant and why not also put that |
10336b7 to
f87cb88
Compare
Contributor
Author
|
@sonninnos Ok, done. To be honest i'm still learning this stuff and completely forgot about C89 😅 |
Collaborator
|
Nice. Might as well put that old |
f87cb88 to
31ff088
Compare
sonninnos
reviewed
Jan 7, 2026
31ff088 to
7bdeba3
Compare
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.
This fixes multiple Windows
rawinput issues that can occur after the window state changes, which can cause the mouse pointer to jump around and make incorrect selections on the menu.Things that can cause this to happen:
It's hard to describe exactly how to reproduce each issue, so i've created the video below which shows the behaviour before and after this fix:
Comparison.mp4
The behaviour can vary depending on what menu item was previously selected before the window resize/refocus happened, but it's all the same kind of problems where the mouse jumps around and will do something unintended when clicked. This PR fixes all of these issues by syncing the internal mouse coordinates with the OS cursor position when these window state changes occur.
The
rawinput mouse behaviour now also matchesdinputin these cases (dinput does not have any of these issues).