added fields to graphics info structure to store current mouse position
[rocksndiamonds.git] / src / events.c
index b94e57c5cbfbce47c600abc665a2ac96c09f3439..52595e2512fd177b4127a1bd4af4b3cf13579275 100644 (file)
@@ -74,6 +74,9 @@ static int FilterEvents(const Event *event)
   {
     ((MotionEvent *)event)->x -= video.screen_xoffset;
     ((MotionEvent *)event)->y -= video.screen_yoffset;
+
+    gfx.mouse_x = ((MotionEvent *)event)->x;
+    gfx.mouse_y = ((MotionEvent *)event)->y;
   }
 
   // non-motion events are directly passed to event handler functions