X-Git-Url: http://git.mutantstargoat.com/user/nuclear/?a=blobdiff_plain;ds=sidebyside;f=src%2FCommon%2Ffreeglut_joystick.c;h=d4e74466c0cfb1334f3487adda23276e0f1b5177;hb=1ede9f68f98e29ddd07bd466310967e716bfac92;hp=f6edc26e411b715a50e8e93582d77633d592de07;hpb=76169d74298feb3c4976af3f0f10376f56aec38d;p=freeglut diff --git a/src/Common/freeglut_joystick.c b/src/Common/freeglut_joystick.c index f6edc26..d4e7446 100644 --- a/src/Common/freeglut_joystick.c +++ b/src/Common/freeglut_joystick.c @@ -976,8 +976,21 @@ int fgJoystickDetect( void ) } /* - * Joystick information functions + * Joystick information, setup and execution functions */ + +/* + * Forces the joystick callback to be executed + */ +void FGAPIENTRY glutForceJoystickFunc( void ) +{ + FREEGLUT_EXIT_IF_NOT_INITIALISED ( "glutForceJoystickFunc" ); +#if !defined(_WIN32_WCE) + freeglut_return_if_fail( fgStructure.CurrentWindow != NULL ); + freeglut_return_if_fail( FETCH_WCB( *( fgStructure.CurrentWindow ), Joystick ) ); + fgJoystickPollWindow( fgStructure.CurrentWindow ); +#endif /* !defined(_WIN32_WCE) */ +} int glutJoystickGetNumAxes( int ident ) { FREEGLUT_EXIT_IF_NOT_INITIALISED ( "glutJoystickGetNumAxes" );