src/joystick/bsd/SDL_sysjoystick.c
changeset 3703 df65ae8f32e8
parent 3697 f7b03b6838cb
child 4537 cd344ebc14e9
equal deleted inserted replaced
3702:6604099437ac 3703:df65ae8f32e8
   305     if (hw->repdesc == NULL) {
   305     if (hw->repdesc == NULL) {
   306         SDL_SetError("%s: USB_GET_REPORT_DESC: %s", hw->path,
   306         SDL_SetError("%s: USB_GET_REPORT_DESC: %s", hw->path,
   307                      strerror(errno));
   307                      strerror(errno));
   308         goto usberr;
   308         goto usberr;
   309     }
   309     }
       
   310     rep = &hw->inreport;
   310 #if defined(__FREEBSD__) && (__FreeBSD_kernel_version > 800063)
   311 #if defined(__FREEBSD__) && (__FreeBSD_kernel_version > 800063)
   311     rep->rid = hid_get_report_id(fd);
   312     rep->rid = hid_get_report_id(fd);
   312     if (rep->rid < 0) {
   313     if (rep->rid < 0) {
   313 #else
   314 #else
   314     rep = &hw->inreport;
       
   315     if (ioctl(fd, USB_GET_REPORT_ID, &rep->rid) < 0) {
   315     if (ioctl(fd, USB_GET_REPORT_ID, &rep->rid) < 0) {
   316 #endif
   316 #endif
   317         rep->rid = -1;          /* XXX */
   317         rep->rid = -1;          /* XXX */
   318     }
   318     }
   319     if (report_alloc(rep, hw->repdesc, REPORT_INPUT) < 0) {
   319     if (report_alloc(rep, hw->repdesc, REPORT_INPUT) < 0) {