rnd-20131203-1-src
[rocksndiamonds.git] / src / events.c
index 122311d1a527345b924ce8bca12673dca7d216e8..75e32c717c3a82ff48c8797f4b59bad65db6b868 100644 (file)
@@ -39,7 +39,7 @@ static unsigned int playfield_cursor_delay = 0;
 /* event filter addition for SDL2: as SDL2 does not have a function to enable
    or disable keyboard auto-repeat, filter repeated keyboard events instead */
 
-int FilterEvents(const Event *event)
+static int FilterEventsExt(const Event *event)
 {
   MotionEvent *motion;
 
@@ -74,6 +74,18 @@ int FilterEvents(const Event *event)
   return 1;
 }
 
+#if defined(TARGET_SDL2)
+int FilterEvents(void *userdata, Event *event)
+{
+  return FilterEventsExt(event);
+}
+#else
+int FilterEvents(const Event *event)
+{
+  return FilterEventsExt(event);
+}
+#endif
+
 /* to prevent delay problems, skip mouse motion events if the very next
    event is also a mouse motion event (and therefore effectively only
    handling the last of a row of mouse motion events in the event queue) */
@@ -115,7 +127,7 @@ static boolean NextValidEvent(Event *event)
 
     NextEvent(event);
 
-    if (FilterMouseMotionEvents(event))
+    if (FilterEventsExt(event))
       handle_this_event = TRUE;
 
     if (SkipPressedMouseMotionEvent(event))