X-Git-Url: http://git.mutantstargoat.com/user/nuclear/?a=blobdiff_plain;f=src%2Ffreeglut_joystick.c;h=4bb8a3720fd09777a6dc0ab06f6fda06936ed47f;hb=164f40e04e857b4edd4f58427cae44ceb85dbce0;hp=5bb29702df1d264c80c9127c5f862b0b085b0e8e;hpb=2e5dc871b7c1df472978af9811d0e97b6684707c;p=freeglut diff --git a/src/freeglut_joystick.c b/src/freeglut_joystick.c index 5bb2970..4bb8a37 100644 --- a/src/freeglut_joystick.c +++ b/src/freeglut_joystick.c @@ -597,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) + * ); + */ } /*