src/joystick/hidapi/SDL_hidapijoystick.c
changeset 13662 d32d92e782ab
parent 13633 340324c76848
child 13696 ea20a7434b98
     1.1 --- a/src/joystick/hidapi/SDL_hidapijoystick.c	Fri Mar 20 20:53:26 2020 -0700
     1.2 +++ b/src/joystick/hidapi/SDL_hidapijoystick.c	Fri Mar 20 21:05:07 2020 -0700
     1.3 @@ -427,11 +427,13 @@
     1.4      }
     1.5  #endif
     1.6  
     1.7 -    if (device->usage_page && device->usage_page != USAGE_PAGE_GENERIC_DESKTOP) {
     1.8 -        return NULL;
     1.9 -    }
    1.10 -    if (device->usage && device->usage != USAGE_JOYSTICK && device->usage != USAGE_GAMEPAD && device->usage != USAGE_MULTIAXISCONTROLLER) {
    1.11 -        return NULL;
    1.12 +	if (device->vendor_id != USB_VENDOR_VALVE) {
    1.13 +        if (device->usage_page && device->usage_page != USAGE_PAGE_GENERIC_DESKTOP) {
    1.14 +            return NULL;
    1.15 +        }
    1.16 +        if (device->usage && device->usage != USAGE_JOYSTICK && device->usage != USAGE_GAMEPAD && device->usage != USAGE_MULTIAXISCONTROLLER) {
    1.17 +            return NULL;
    1.18 +        }
    1.19      }
    1.20  
    1.21      type = SDL_GetJoystickGameControllerType(device->name, device->vendor_id, device->product_id, device->interface_number, device->interface_class, device->interface_subclass, device->interface_protocol);