Fixed relative mouse motion moving farther and farther off screen.
--- a/src/events/SDL_mouse.c Sat Mar 28 00:48:03 2015 -0400
+++ b/src/events/SDL_mouse.c Mon Mar 30 11:31:53 2015 -0700
@@ -293,9 +293,14 @@
event.motion.yrel = yrel;
posted = (SDL_PushEvent(&event) > 0);
}
- /* Use unclamped values if we're getting events outside the window */
- mouse->last_x = x;
- mouse->last_y = y;
+ if (relative) {
+ mouse->last_x = mouse->x;
+ 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;
}