src/joystick/bsd/SDL_sysjoystick.c
branchSDL-1.2
changeset 4401 1a7b62893c9d
parent 4323 b3171b7561d8
child 4540 e978b888d87a
equal deleted inserted replaced
4400:9134017bac3a 4401:1a7b62893c9d
   301 	if (hw->repdesc == NULL) {
   301 	if (hw->repdesc == NULL) {
   302 		SDL_SetError("%s: USB_GET_REPORT_DESC: %s", hw->path,
   302 		SDL_SetError("%s: USB_GET_REPORT_DESC: %s", hw->path,
   303 		    strerror(errno));
   303 		    strerror(errno));
   304 		goto usberr;
   304 		goto usberr;
   305 	}
   305 	}
       
   306 	rep = &hw->inreport;
   306 #if defined(__FREEBSD__) && (__FreeBSD_kernel_version > 800063)
   307 #if defined(__FREEBSD__) && (__FreeBSD_kernel_version > 800063)
   307        rep->rid = hid_get_report_id(fd);
   308        rep->rid = hid_get_report_id(fd);
   308        if (rep->rid < 0) {
   309        if (rep->rid < 0) {
   309 #else
   310 #else
   310 	rep = &hw->inreport;
       
   311 	if (ioctl(fd, USB_GET_REPORT_ID, &rep->rid) < 0) {
   311 	if (ioctl(fd, USB_GET_REPORT_ID, &rep->rid) < 0) {
   312 #endif
   312 #endif
   313 		rep->rid = -1; /* XXX */
   313 		rep->rid = -1; /* XXX */
   314 	}
   314 	}
   315 	if (report_alloc(rep, hw->repdesc, REPORT_INPUT) < 0) {
   315 	if (report_alloc(rep, hw->repdesc, REPORT_INPUT) < 0) {