------- Comment #8 From Sergey Svishchev 2006-03-19 12:35 [reply] -------
authorSam Lantinga <slouken@libsdl.org>
Mon, 20 Mar 2006 08:00:07 +0000
changeset 1559 e7f61857028a
parent 1558 b46bb79cc197
child 1560 34b9e479047e
------- 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.
src/joystick/bsd/SDL_sysjoystick.c
--- 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;
 	}