X-Git-Url: http://git.mutantstargoat.com/user/nuclear/?a=blobdiff_plain;f=src%2Ffreeglut_joystick.c;h=4bb8a3720fd09777a6dc0ab06f6fda06936ed47f;hb=9092fad9f750e8bab3ce7d7fc5a30f2b036a1cfb;hp=1b2285ba8970e741e384dbcfe599da3f744aacef;hpb=19ec40fe17e7f60ce3548d986249381014807c35;p=freeglut diff --git a/src/freeglut_joystick.c b/src/freeglut_joystick.c index 1b2285b..4bb8a37 100644 --- a/src/freeglut_joystick.c +++ b/src/freeglut_joystick.c @@ -42,8 +42,6 @@ #include "config.h" #endif -#define G_LOG_DOMAIN "freeglut-joystick" - #include "../include/GL/freeglut.h" #include "freeglut_internal.h" @@ -599,17 +597,26 @@ void fgJoystickPollWindow( SFG_Window* window ) int buttons; freeglut_return_if_fail( fgJoystick != NULL && window != NULL ); - freeglut_return_if_fail( window->Callbacks.Joystick != NULL ); + freeglut_return_if_fail( FETCH_WCB( *window, Joystick ) ); fghJoystickRead( fgJoystick, &buttons, axes ); - fgSetWindow (window); - window->Callbacks.Joystick( - buttons, - (int) (axes[ 0 ] * 1000.0f), - (int) (axes[ 1 ] * 1000.0f), - (int) (axes[ 2 ] * 1000.0f) + INVOKE_WCB( *window, Joystick, + ( buttons, + (int) (axes[ 0 ] * 1000.0f ), + (int) (axes[ 1 ] * 1000.0f ), + (int) (axes[ 2 ] * 1000.0f ) ) ); + + /* + * fgSetWindow (window); + * window->Callbacks.Joystick( + * buttons, + * (int) (axes[ 0 ] * 1000.0f), + * (int) (axes[ 1 ] * 1000.0f), + * (int) (axes[ 2 ] * 1000.0f) + * ); + */ } /*