diff src/joystick/bsd/SDL_sysjoystick.c @ 1559:e7f61857028a

------- Comment #8 From Sergey Svishchev 2006-03-19 12:35 [reply] ------- I've made a similar patch to BSD-specific USB driver, please review it too.
author Sam Lantinga <slouken@libsdl.org>
date Mon, 20 Mar 2006 08:00:07 +0000
parents d910939febfa
children 57431b199aed
line wrap: on
line diff
--- a/src/joystick/bsd/SDL_sysjoystick.c	Mon Mar 20 07:31:36 2006 +0000
+++ b/src/joystick/bsd/SDL_sysjoystick.c	Mon Mar 20 08:00:07 2006 +0000
@@ -272,7 +272,9 @@
 	}
 
 	rep = &hw->inreport;
-	rep->rid = 0;
+	if (ioctl(fd, USB_GET_REPORT_ID, &rep->rid) < 0) {
+		rep->rid = -1; /* XXX */
+	}
 	if (report_alloc(rep, hw->repdesc, REPORT_INPUT) < 0) {
 		goto usberr;
 	}