changeset 552:639d58d32471

*** empty log message ***
author Sam Lantinga <slouken@libsdl.org>
date Mon, 02 Dec 2002 02:35:58 +0000
parents b0c5a13a4243
children 417f8709e648
files src/joystick/bsd/SDL_sysjoystick.c
diffstat 1 files changed, 14 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/src/joystick/bsd/SDL_sysjoystick.c	Mon Dec 02 01:47:03 2002 +0000
+++ b/src/joystick/bsd/SDL_sysjoystick.c	Mon Dec 02 02:35:58 2002 +0000
@@ -32,6 +32,8 @@
  "@(#) $Id$";
 #endif
 
+#include <sys/param.h>
+
 #include <stdio.h>
 #include <stdlib.h>
 #include <unistd.h>
@@ -406,11 +408,20 @@
 {
 	int len;
 
-#ifdef USBHID_NEW
-	len = hid_report_size(rd, repinfo[repind].kind, r->rid);
-#else
+#ifdef __FreeBSD__
+# if (__FreeBSD_version >= 470000)
+	len = hid_report_size(rd, r->rid, repinfo[repind].kind);
+# else
 	len = hid_report_size(rd, repinfo[repind].kind, &r->rid);
 #endif
+#else
+# ifdef USBHID_NEW
+	len = hid_report_size(rd, repinfo[repind].kind, &r->rid);
+# else
+	len = hid_report_size(rd, repinfo[repind].kind, r->rid);
+# endif
+#endif
+
 	if (len < 0) {
 		SDL_SetError("Negative HID report size");
 		return (-1);