|
@@ -413,7 +413,7 @@ HIDAPI_GetDeviceDriver(SDL_HIDAPI_Device *device)
|
|
const Uint16 USAGE_GAMEPAD = 0x0005;
|
|
const Uint16 USAGE_GAMEPAD = 0x0005;
|
|
const Uint16 USAGE_MULTIAXISCONTROLLER = 0x0008;
|
|
const Uint16 USAGE_MULTIAXISCONTROLLER = 0x0008;
|
|
int i;
|
|
int i;
|
|
- SDL_GameControllerType type = SDL_GetJoystickGameControllerType(device->name, device->vendor_id, device->product_id, device->interface_number, device->interface_class, device->interface_subclass, device->interface_protocol);
|
|
|
|
|
|
+ SDL_GameControllerType type;
|
|
|
|
|
|
if (SDL_ShouldIgnoreJoystick(device->name, device->guid)) {
|
|
if (SDL_ShouldIgnoreJoystick(device->name, device->guid)) {
|
|
return NULL;
|
|
return NULL;
|
|
@@ -426,6 +426,7 @@ HIDAPI_GetDeviceDriver(SDL_HIDAPI_Device *device)
|
|
return NULL;
|
|
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);
|
|
for (i = 0; i < SDL_arraysize(SDL_HIDAPI_drivers); ++i) {
|
|
for (i = 0; i < SDL_arraysize(SDL_HIDAPI_drivers); ++i) {
|
|
SDL_HIDAPI_DeviceDriver *driver = SDL_HIDAPI_drivers[i];
|
|
SDL_HIDAPI_DeviceDriver *driver = SDL_HIDAPI_drivers[i];
|
|
if (driver->enabled && driver->IsSupportedDevice(device->name, type, device->vendor_id, device->product_id, device->version, device->interface_number, device->interface_class, device->interface_subclass, device->interface_protocol)) {
|
|
if (driver->enabled && driver->IsSupportedDevice(device->name, type, device->vendor_id, device->product_id, device->version, device->interface_number, device->interface_class, device->interface_subclass, device->interface_protocol)) {
|