src/joystick/hidapi/SDL_hidapijoystick.c
changeset 13662 d32d92e782ab
parent 13633 340324c76848
child 13696 ea20a7434b98
equal deleted inserted replaced
13661:8a949642b6eb 13662:d32d92e782ab
   425         /* The RAWINPUT driver is taking care of this device */
   425         /* The RAWINPUT driver is taking care of this device */
   426         return NULL;
   426         return NULL;
   427     }
   427     }
   428 #endif
   428 #endif
   429 
   429 
   430     if (device->usage_page && device->usage_page != USAGE_PAGE_GENERIC_DESKTOP) {
   430 	if (device->vendor_id != USB_VENDOR_VALVE) {
   431         return NULL;
   431         if (device->usage_page && device->usage_page != USAGE_PAGE_GENERIC_DESKTOP) {
   432     }
   432             return NULL;
   433     if (device->usage && device->usage != USAGE_JOYSTICK && device->usage != USAGE_GAMEPAD && device->usage != USAGE_MULTIAXISCONTROLLER) {
   433         }
   434         return NULL;
   434         if (device->usage && device->usage != USAGE_JOYSTICK && device->usage != USAGE_GAMEPAD && device->usage != USAGE_MULTIAXISCONTROLLER) {
       
   435             return NULL;
       
   436         }
   435     }
   437     }
   436 
   438 
   437     type = SDL_GetJoystickGameControllerType(device->name, device->vendor_id, device->product_id, device->interface_number, device->interface_class, device->interface_subclass, device->interface_protocol);
   439     type = SDL_GetJoystickGameControllerType(device->name, device->vendor_id, device->product_id, device->interface_number, device->interface_class, device->interface_subclass, device->interface_protocol);
   438     for (i = 0; i < SDL_arraysize(SDL_HIDAPI_drivers); ++i) {
   440     for (i = 0; i < SDL_arraysize(SDL_HIDAPI_drivers); ++i) {
   439         SDL_HIDAPI_DeviceDriver *driver = SDL_HIDAPI_drivers[i];
   441         SDL_HIDAPI_DeviceDriver *driver = SDL_HIDAPI_drivers[i];