diff src/joystick/SDL_joystick.c @ 1722:5daa04d862f1 SDL-1.3

Added a userdata parameter for event filters. Added a function to filter the existing queued events. Added explicit support for relative mouse mode to the API.
author Sam Lantinga <slouken@libsdl.org>
date Fri, 30 Jun 2006 08:18:44 +0000
parents 4da1ee79c9af
children
line wrap: on
line diff
--- a/src/joystick/SDL_joystick.c	Fri Jun 30 05:50:35 2006 +0000
+++ b/src/joystick/SDL_joystick.c	Fri Jun 30 08:18:44 2006 +0000
@@ -448,7 +448,8 @@
         event.jaxis.which = joystick->index;
         event.jaxis.axis = axis;
         event.jaxis.value = value;
-        if ((SDL_EventOK == NULL) || (*SDL_EventOK) (&event)) {
+        if ((SDL_EventOK == NULL)
+            || (*SDL_EventOK) (SDL_EventOKParam, &event)) {
             posted = 1;
             SDL_PushEvent(&event);
         }
@@ -474,7 +475,8 @@
         event.jhat.which = joystick->index;
         event.jhat.hat = hat;
         event.jhat.value = value;
-        if ((SDL_EventOK == NULL) || (*SDL_EventOK) (&event)) {
+        if ((SDL_EventOK == NULL)
+            || (*SDL_EventOK) (SDL_EventOKParam, &event)) {
             posted = 1;
             SDL_PushEvent(&event);
         }
@@ -503,7 +505,8 @@
         event.jball.ball = ball;
         event.jball.xrel = xrel;
         event.jball.yrel = yrel;
-        if ((SDL_EventOK == NULL) || (*SDL_EventOK) (&event)) {
+        if ((SDL_EventOK == NULL)
+            || (*SDL_EventOK) (SDL_EventOKParam, &event)) {
             posted = 1;
             SDL_PushEvent(&event);
         }
@@ -542,7 +545,8 @@
         event.jbutton.which = joystick->index;
         event.jbutton.button = button;
         event.jbutton.state = state;
-        if ((SDL_EventOK == NULL) || (*SDL_EventOK) (&event)) {
+        if ((SDL_EventOK == NULL)
+            || (*SDL_EventOK) (SDL_EventOKParam, &event)) {
             posted = 1;
             SDL_PushEvent(&event);
         }