-
Notifications
You must be signed in to change notification settings - Fork 2.5k
[Windows] Report raw absolute mouse input as pen events when SDL_HINT_PEN_MOUSE_EVENTS is disabled #12329
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Functionally-wise, LGTM.
On osu!-side though, as said on Discord, cursor sensitivity doesn't work for tablets anymore (compared to SDL2). Can be done osu!-side.
|
Can you split these into separate PRs? I want to merge the second commit, but the first one needs more review from @icculus |
|
The second commit only touches code added in the first, it's not possible to split it out. |
|
Okay, never mind, we'll wait on @icculus then. |
|
I'm fine with this, but there's a conflicting line... (SDL_TouchDevicesAvailable() && (rawmouse->ulExtraInformation & 0x80) == 0x80)) {...@Susko3, can you make sure that won't mess up your patch (like, rawmouse->ulExtraInformation in these cases isn't going to cause this to throw away these events in this scenario)? If that's going to be okay, I'll resolve the conflict and merge. |
This should be fine, as the
|
5267096 to
082d144
Compare
|
Okay, we're rebased, the memory leak is resolved...if the builders turn green, we merge! |
|
Did you check this with RDP? I thought mouse motion was sent as raw absolute in that case. |
I had no idea...I'll try that out real fast. |
|
(Also my rebase broke this, stand by on that, too.) |
082d144 to
4e6153f
Compare
|
Remote desktop should be unaffected, as I didn't touch the |
…VENTS=0. Some caveats: - the fake pen will leave proximity only when relative mode is disabled - unsure if detecting proximity is even possible from raw mouse input Fixes libsdl-org#12324.
4e6153f to
805a10b
Compare
Ah, good point. |
|
Okay, so...merge? |
Description
Raw absolute mouse input is currently understood as being tablet (pen) input and is converted to relative mouse input events. Raw mouse input is only reported when relative mouse mode is enabled. With this change, and when SDL_HINT_PEN_MOUSE_EVENTS is disabled, this input will be reported as pen motion events.
Some caveats:
SDL_Pen *fromSDL_pen.cSDL_VideoDatabut I find it silly, and the resulting code is hard to readTesting
I can confirm this fixes the original issue. Tested on Windows 11 24H2 with OpenTabletDriver and a Wacom CTL-6100WL.
Existing Issue(s)