freebsd-ports/graphics/freeglut/files/patch-src_freeglut_joystick.c
Pietro Cerutti 48bbd15b98 - Update to 2.8.0
Changes:

  * There are now callbacks to support multitouch capability.
  * Solaris and OSX support have improved.
  * Fullscreen mode and Game mode behave better.
  * Addition of Visual Studio 2010 projects & solutions.
  * Many bugs have been fixed.

PR:		163829
Submitted by:	Pietro Cerutti <gahr@FreeBSD.org>
2012-02-08 10:32:52 +00:00

30 lines
770 B
C

--- src/freeglut_joystick.c.orig 2011-09-28 03:37:26.000000000 +0200
+++ src/freeglut_joystick.c 2012-01-05 09:51:03.000000000 +0100
@@ -152,7 +152,10 @@
# include <libusbhid.h>
# endif
# endif
-# include <legacy/dev/usb/usb.h>
+# include <dev/usb/usb.h>
+# if __FreeBSD_version >= 800061
+# include <dev/usb/usb_ioctl.h>
+# endif
# include <dev/usb/usbhid.h>
/* Compatibility with older usb.h revisions */
@@ -199,6 +202,7 @@
*/
static char *fghJoystickWalkUSBdev(int f, char *dev, char *out, int outlen)
{
+#if __FreeBSD_version < 800061
struct usb_device_info di;
int i, a;
char *cp;
@@ -220,6 +224,7 @@
return out;
}
}
+#endif
return NULL;
}