mirror of
https://github.com/Ryujinx/SDL.git
synced 2024-12-23 13:35:40 +00:00
Return true from IsSupportedDevice if it's a device that we _might_ support
This forces an update of the device list so we have the correct state when we check to see whether a device is being handled by HIDAPI
This commit is contained in:
parent
1d34a5249d
commit
5b4c10fc7b
|
@ -185,11 +185,19 @@ HIDAPI_DriverPS4_IsSupportedDevice(SDL_HIDAPI_Device *device, const char *name,
|
||||||
return SDL_TRUE;
|
return SDL_TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (device && SONY_THIRDPARTY_VENDOR(device->vendor_id) &&
|
if (SONY_THIRDPARTY_VENDOR(vendor_id)) {
|
||||||
(size = ReadFeatureReport(device->dev, k_ePS4FeatureReportIdCapabilities, data, sizeof(data))) == 48 &&
|
if (device) {
|
||||||
data[2] == 0x27) {
|
if ((size = ReadFeatureReport(device->dev, k_ePS4FeatureReportIdCapabilities, data, sizeof(data))) == 48 &&
|
||||||
/* Supported third party controller */
|
data[2] == 0x27) {
|
||||||
return SDL_TRUE;
|
/* Supported third party controller */
|
||||||
|
return SDL_TRUE;
|
||||||
|
} else {
|
||||||
|
return SDL_FALSE;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
/* Might be supported by this driver, enumerate and find out */
|
||||||
|
return SDL_TRUE;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return SDL_FALSE;
|
return SDL_FALSE;
|
||||||
|
|
|
@ -267,13 +267,20 @@ HIDAPI_DriverPS5_IsSupportedDevice(SDL_HIDAPI_Device *device, const char *name,
|
||||||
return SDL_TRUE;
|
return SDL_TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (device && SONY_THIRDPARTY_VENDOR(device->vendor_id) &&
|
if (SONY_THIRDPARTY_VENDOR(vendor_id)) {
|
||||||
(size = ReadFeatureReport(device->dev, k_EPS5FeatureReportIdCapabilities, data, sizeof(data))) == 48 &&
|
if (device) {
|
||||||
data[2] == 0x28) {
|
if ((size = ReadFeatureReport(device->dev, k_EPS5FeatureReportIdCapabilities, data, sizeof(data))) == 48 &&
|
||||||
/* Supported third party controller */
|
data[2] == 0x28) {
|
||||||
return SDL_TRUE;
|
/* Supported third party controller */
|
||||||
|
return SDL_TRUE;
|
||||||
|
} else {
|
||||||
|
return SDL_FALSE;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
/* Might be supported by this driver, enumerate and find out */
|
||||||
|
return SDL_TRUE;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return SDL_FALSE;
|
return SDL_FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue