mirror of
https://github.com/Relintai/sdl2_frt.git
synced 2025-02-04 11:15:57 +01:00
Fixed relative mouse motion moving farther and farther off screen.
This commit is contained in:
parent
a0e878aafb
commit
236deab49b
@ -293,9 +293,14 @@ SDL_PrivateSendMouseMotion(SDL_Window * window, SDL_MouseID mouseID, int relativ
|
|||||||
event.motion.yrel = yrel;
|
event.motion.yrel = yrel;
|
||||||
posted = (SDL_PushEvent(&event) > 0);
|
posted = (SDL_PushEvent(&event) > 0);
|
||||||
}
|
}
|
||||||
/* Use unclamped values if we're getting events outside the window */
|
if (relative) {
|
||||||
mouse->last_x = x;
|
mouse->last_x = mouse->x;
|
||||||
mouse->last_y = y;
|
mouse->last_y = mouse->y;
|
||||||
|
} else {
|
||||||
|
/* Use unclamped values if we're getting events outside the window */
|
||||||
|
mouse->last_x = x;
|
||||||
|
mouse->last_y = y;
|
||||||
|
}
|
||||||
return posted;
|
return posted;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user