added fields to graphics info structure to store current mouse position
[rocksndiamonds.git] / src / events.c
index 8279f70fb223bba859d2203823528650d7b40ef4..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
@@ -1016,6 +1019,8 @@ void HandleFingerEvent(FingerEvent *event)
        event->pressure);
 #endif
 
+  runtime.uses_touch_device = TRUE;
+
   if (game_status != GAME_MODE_PLAYING)
     return;