X-Git-Url: http://git.mutantstargoat.com/user/nuclear/?a=blobdiff_plain;f=src%2Ffreeglut_joystick.c;h=62c91efa45d52a23530415bbab5372c96fca8189;hb=aa51f2a733292a31345da9aa5167558496ef1915;hp=e4bd53bb904a75406233df91102ee38eb282b9e7;hpb=81f7f85ade2f873ebee9afa3ad810046771cb5c3;p=freeglut diff --git a/src/freeglut_joystick.c b/src/freeglut_joystick.c index e4bd53b..62c91ef 100644 --- a/src/freeglut_joystick.c +++ b/src/freeglut_joystick.c @@ -1039,7 +1039,7 @@ static int fghJoystickGetOEMProductName ( SFG_Joystick* joy, char *buf, int buf_ static void fghJoystickOpen( SFG_Joystick* joy ) { - int i; + int i = 0; #if TARGET_HOST_MACINTOSH OSStatus err; #endif @@ -1060,8 +1060,8 @@ static void fghJoystickOpen( SFG_Joystick* joy ) # ifdef JS_NEW unsigned char u; # else -# if defined( __linux__ ) - int counter; +# if defined( __linux__ ) || TARGET_HOST_SOLARIS + int counter = 0; # endif # endif #endif @@ -1394,7 +1394,7 @@ static void fghJoystickOpen( SFG_Joystick* joy ) # endif #endif -#if defined( __linux__ ) +#if defined( __linux__ ) || TARGET_HOST_SOLARIS /* Default for older Linux systems. */ joy->num_axes = 2; joy->num_buttons = 32; @@ -1688,9 +1688,6 @@ int fgJoystickDetect( void ) fgInitialiseJoysticks (); - if ( !fgJoystick ) - return 0; - if ( !fgState.JoysticksInitialised ) return 0;