mirror of
https://github.com/encounter/SDL.git
synced 2025-05-28 18:21:42 +00:00
Use mouse ID 0 for raw mouse events
We don't track state for each mouse individually, so we should just use the global mouse ID for all events. Fixes https://github.com/libsdl-org/SDL/issues/5026
This commit is contained in:
parent
f1c15aa324
commit
942973dd86
@ -780,7 +780,11 @@ WIN_WindowProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
|
|||||||
(GetMouseMessageSource() == SDL_MOUSE_EVENT_SOURCE_TOUCH || (GetMessageExtraInfo() & 0x82) == 0x82)) {
|
(GetMouseMessageSource() == SDL_MOUSE_EVENT_SOURCE_TOUCH || (GetMessageExtraInfo() & 0x82) == 0x82)) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
mouseID = (SDL_MouseID)(uintptr_t)inp.header.hDevice;
|
/* We do all of our mouse state checking against mouse ID 0
|
||||||
|
* We would only use the actual hDevice if we were tracking
|
||||||
|
* all mouse motion independently, and never using mouse ID 0.
|
||||||
|
*/
|
||||||
|
mouseID = 0; /* (SDL_MouseID)(uintptr_t)inp.header.hDevice; */
|
||||||
rawmouse = &inp.data.mouse;
|
rawmouse = &inp.data.mouse;
|
||||||
|
|
||||||
if ((rawmouse->usFlags & 0x01) == MOUSE_MOVE_RELATIVE) {
|
if ((rawmouse->usFlags & 0x01) == MOUSE_MOVE_RELATIVE) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user