From 4e334977a160e4356bbc1e953e4a924a394727e2 Mon Sep 17 00:00:00 2001 From: spanne Date: Sat, 2 Jul 2005 13:13:30 +0000 Subject: [PATCH] Partial fixes for bug #1218900 (freeglut-2.4.0 on FreeBSD). git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@660 7f0cb862-5218-0410-a997-914c9d46530a --- freeglut/freeglut/ChangeLog | 2 ++ freeglut/freeglut/src/freeglut_joystick.c | 10 ++++++---- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/freeglut/freeglut/ChangeLog b/freeglut/freeglut/ChangeLog index 3efc545..48e51d5 100644 --- a/freeglut/freeglut/ChangeLog +++ b/freeglut/freeglut/ChangeLog @@ -1090,3 +1090,5 @@ linking troubles for the examples. (282) Remove wrong "execute" bits when creating a distribution. This fixes bug #961938 (Executable bit set on non exe files). + +(283) Partial fixes for bug #1218900 (freeglut-2.4.0 on FreeBSD). diff --git a/freeglut/freeglut/src/freeglut_joystick.c b/freeglut/freeglut/src/freeglut_joystick.c index b6fcdbc..dc0d0bb 100644 --- a/freeglut/freeglut/src/freeglut_joystick.c +++ b/freeglut/freeglut/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,7 +1060,9 @@ static void fghJoystickOpen( SFG_Joystick* joy ) # ifdef JS_NEW unsigned char u; # else - int counter; +# if defined( __linux__ ) + int counter; +# endif # endif #endif