diff src/events/SDL_mouse.c @ 1731:875c3cf1a12c SDL-1.3

SDL_PushEvent() calls the event filter code, and has a return value to tell whether or not the event was actually pushed. SDL_GetEventFilter() now returns an SDL_bool instead of the filter function.
author Sam Lantinga <slouken@libsdl.org>
date Sat, 08 Jul 2006 20:07:08 +0000
parents 6c63fc2bd986
children fd65f12b6de6
line wrap: on
line diff
--- a/src/events/SDL_mouse.c	Sat Jul 08 18:06:02 2006 +0000
+++ b/src/events/SDL_mouse.c	Sat Jul 08 20:07:08 2006 +0000
@@ -371,11 +371,7 @@
         event.motion.xrel = xrel;
         event.motion.yrel = yrel;
         event.motion.windowID = mouse->focus;
-        if ((SDL_EventOK == NULL)
-            || (*SDL_EventOK) (SDL_EventOKParam, &event)) {
-            posted = 1;
-            SDL_PushEvent(&event);
-        }
+        posted = (SDL_PushEvent(&event) > 0);
     }
     return posted;
 }
@@ -425,11 +421,7 @@
         event.button.x = mouse->x;
         event.button.y = mouse->y;
         event.button.windowID = mouse->focus;
-        if ((SDL_EventOK == NULL)
-            || (*SDL_EventOK) (SDL_EventOKParam, &event)) {
-            posted = 1;
-            SDL_PushEvent(&event);
-        }
+        posted = (SDL_PushEvent(&event) > 0);
     }
     return posted;
 }
@@ -452,11 +444,7 @@
         event.wheel.which = (Uint8) index;
         event.wheel.motion = motion;
         event.wheel.windowID = mouse->focus;
-        if ((SDL_EventOK == NULL)
-            || (*SDL_EventOK) (SDL_EventOKParam, &event)) {
-            posted = 1;
-            SDL_PushEvent(&event);
-        }
+        posted = (SDL_PushEvent(&event) > 0);
     }
     return posted;
 }