mirror of https://github.com/libsdl-org/SDL.git
Make sure that we process touch events that position the mouse
Fixes https://github.com/libsdl-org/SDL/issues/8176
This commit is contained in:
parent
f84c87f204
commit
8a8aed477d
|
|
@ -609,6 +609,13 @@ static int SDL_PrivateSendMouseMotion(Uint64 timestamp, SDL_Window *window, SDL_
|
|||
}
|
||||
}
|
||||
|
||||
if (mouse->has_position && xrel == 0.0f && yrel == 0.0f) { /* Drop events that don't change state */
|
||||
#ifdef DEBUG_MOUSE
|
||||
SDL_Log("Mouse event didn't change state - dropped!\n");
|
||||
#endif
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* Ignore relative motion positioning the first touch */
|
||||
if (mouseID == SDL_TOUCH_MOUSEID && !GetButtonState(mouse, SDL_TRUE)) {
|
||||
xrel = 0.0f;
|
||||
|
|
@ -616,13 +623,6 @@ static int SDL_PrivateSendMouseMotion(Uint64 timestamp, SDL_Window *window, SDL_
|
|||
}
|
||||
|
||||
if (mouse->has_position) {
|
||||
if (xrel == 0.0f && yrel == 0.0f) { /* Drop events that don't change state */
|
||||
#ifdef DEBUG_MOUSE
|
||||
SDL_Log("Mouse event didn't change state - dropped!\n");
|
||||
#endif
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* Update internal mouse coordinates */
|
||||
if (!mouse->relative_mode) {
|
||||
mouse->x = x;
|
||||
|
|
|
|||
Loading…
Reference in New Issue