mirror of https://github.com/encounter/SDL.git
Allow Valve devices in driver check, we know they're well behaved controllers
This commit is contained in:
parent
6e646b6156
commit
f55cbdfd96
|
@ -427,11 +427,13 @@ HIDAPI_GetDeviceDriver(SDL_HIDAPI_Device *device)
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (device->usage_page && device->usage_page != USAGE_PAGE_GENERIC_DESKTOP) {
|
if (device->vendor_id != USB_VENDOR_VALVE) {
|
||||||
return NULL;
|
if (device->usage_page && device->usage_page != USAGE_PAGE_GENERIC_DESKTOP) {
|
||||||
}
|
return NULL;
|
||||||
if (device->usage && device->usage != USAGE_JOYSTICK && device->usage != USAGE_GAMEPAD && device->usage != USAGE_MULTIAXISCONTROLLER) {
|
}
|
||||||
return NULL;
|
if (device->usage && device->usage != USAGE_JOYSTICK && device->usage != USAGE_GAMEPAD && device->usage != USAGE_MULTIAXISCONTROLLER) {
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
type = SDL_GetJoystickGameControllerType(device->name, device->vendor_id, device->product_id, device->interface_number, device->interface_class, device->interface_subclass, device->interface_protocol);
|
type = SDL_GetJoystickGameControllerType(device->name, device->vendor_id, device->product_id, device->interface_number, device->interface_class, device->interface_subclass, device->interface_protocol);
|
||||||
|
|
Loading…
Reference in New Issue