src/joystick/bsd/SDL_sysjoystick.c
changeset 12378 61b267339239
parent 12359 691c32a30fb9
child 12503 806492103856
equal deleted inserted replaced
12377:84618d571795 12378:61b267339239
   297     char *path = joynames[device_index];
   297     char *path = joynames[device_index];
   298     struct joystick_hwdata *hw;
   298     struct joystick_hwdata *hw;
   299     struct hid_item hitem;
   299     struct hid_item hitem;
   300     struct hid_data *hdata;
   300     struct hid_data *hdata;
   301     struct report *rep = NULL;
   301     struct report *rep = NULL;
       
   302 #if defined(__NetBSD__)
       
   303     usb_device_descriptor_t udd;
       
   304     struct usb_string_desc usd;
       
   305 #endif
   302     int fd;
   306     int fd;
   303     int i;
   307     int i;
   304 
   308 
   305     fd = open(path, O_RDONLY);
   309     fd = open(path, O_RDONLY);
   306     if (fd == -1) {
   310     if (fd == -1) {
   348     if (ioctl(fd, USB_GET_REPORT_ID, &rep->rid) < 0) {
   352     if (ioctl(fd, USB_GET_REPORT_ID, &rep->rid) < 0) {
   349 #endif
   353 #endif
   350         rep->rid = -1;          /* XXX */
   354         rep->rid = -1;          /* XXX */
   351     }
   355     }
   352 #if defined(__NetBSD__)
   356 #if defined(__NetBSD__)
   353     usb_device_descriptor_t udd;
       
   354     struct usb_string_desc usd;
       
   355     if (ioctl(fd, USB_GET_DEVICE_DESC, &udd) == -1)
   357     if (ioctl(fd, USB_GET_DEVICE_DESC, &udd) == -1)
   356         goto desc_failed;
   358         goto desc_failed;
   357 
   359 
   358     /* Get default language */
   360     /* Get default language */
   359     usd.usd_string_index = USB_LANGUAGE_TABLE;
   361     usd.usd_string_index = USB_LANGUAGE_TABLE;