X-Git-Url: http://git.mutantstargoat.com/user/nuclear/?a=blobdiff_plain;f=src%2Ffreeglut_joystick.c;h=af7c54c328ac870298b78c7c1af9f0a9d63a37da;hb=ce2e5aba172eb85cda2b4f047bdcf9f54d019fd7;hp=b6fcdbce42dd303805768cd8889990cd09a346e5;hpb=09070646b28804f0a700bd10b6caf8d606712d2c;p=freeglut diff --git a/src/freeglut_joystick.c b/src/freeglut_joystick.c index b6fcdbc..af7c54c 100644 --- a/src/freeglut_joystick.c +++ b/src/freeglut_joystick.c @@ -80,7 +80,7 @@ /* XXX The below hack is done until freeglut's autoconf is updated. */ # define HAVE_USB_JS 1 -# if defined(__FreeBSD__) && __FreeBSD_version >= 500000 +# if defined(__FreeBSD__) # include # else /* @@ -656,9 +656,9 @@ static void fghJoystickRawRead( SFG_Joystick* joy, int* buttons, float* axes ) if (usage > 0 && usage < _JS_MAX_BUTTONS + 1) { if (d) - joy->os->cache_buttons |= (1 << usage - 1); + joy->os->cache_buttons |= (1 << ( usage - 1 )); else - joy->os->cache_buttons &= ~(1 << usage - 1); + joy->os->cache_buttons &= ~(1 << ( usage - 1 )); } } } @@ -1060,10 +1060,15 @@ static void fghJoystickOpen( SFG_Joystick* joy ) # ifdef JS_NEW unsigned char u; # else - int counter; +# if defined( __linux__ ) + int counter; +# endif # endif #endif + /* Silence gcc, the correct #ifdefs would be too fragile... */ + (void)i; + /* * Default values (for no joystick -- each conditional will reset the * error flag)