diff options
Diffstat (limited to 'graphics/freeglut/files/patch-src::freeglut_joystick.c')
-rw-r--r-- | graphics/freeglut/files/patch-src::freeglut_joystick.c | 48 |
1 files changed, 34 insertions, 14 deletions
diff --git a/graphics/freeglut/files/patch-src::freeglut_joystick.c b/graphics/freeglut/files/patch-src::freeglut_joystick.c index 839f07f5e0c5..23f02203881a 100644 --- a/graphics/freeglut/files/patch-src::freeglut_joystick.c +++ b/graphics/freeglut/files/patch-src::freeglut_joystick.c @@ -1,14 +1,34 @@ - -$FreeBSD$ - ---- src/freeglut_joystick.c.orig Mon Nov 10 01:09:42 2003 -+++ src/freeglut_joystick.c Mon Nov 10 01:10:52 2003 -@@ -57,7 +57,7 @@ - # include <unistd.h> - # include <fcntl.h> - # if defined(__FreeBSD__) || defined(__NetBSD__) --# if __FreeBSD_version >= 500000 -+# if defined(__FreeBSD__) - # include <sys/joystick.h> - # else - # include <machine/joystick.h> +--- src/freeglut_joystick.c.orig Wed May 4 14:53:48 2005 ++++ src/freeglut_joystick.c Sat Jun 11 14:40:48 2005 +@@ -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 <sys/joystick.h> + # else + /* +@@ -656,9 +656,9 @@ + 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 @@ + # ifdef JS_NEW + unsigned char u; + # else +- int counter; ++# if defined( __linux__ ) ++ int counter; ++# endif + # endif + #endif + |