mirror of
https://github.com/libsdl-org/SDL.git
synced 2026-06-07 15:10:49 +00:00
Fixed pen mouse motion when SDL_HINT_PEN_MOUSE_EVENTS is off (thanks @frenzibyte!)
Fixes https://github.com/libsdl-org/SDL/issues/14554
This commit is contained in:
parent
7af479bc53
commit
b9d794bb37
1 changed files with 3 additions and 1 deletions
|
|
@ -505,7 +505,9 @@ void SDL_SendPenMotion(Uint64 timestamp, SDL_PenID instance_id, SDL_Window *wind
|
|||
}
|
||||
} else if (pen_touching == 0) { // send mouse motion (without a pressed button) for pens that aren't touching.
|
||||
// this might cause a little chaos if you have multiple pens hovering at the same time, but this seems unlikely in the real world, and also something you did to yourself. :)
|
||||
SDL_SendMouseMotion(timestamp, window, SDL_PEN_MOUSEID, false, x, y);
|
||||
if (mouse->pen_mouse_events) {
|
||||
SDL_SendMouseMotion(timestamp, window, SDL_PEN_MOUSEID, false, x, y);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue