Only open HID devices that might have a HIDAPI driver available

This prevents an OS prompt for every connected device when running on Android
This commit is contained in:
Sam Lantinga
2022-10-07 11:29:49 -07:00
parent 31991ab851
commit 33050fea39
4 changed files with 51 additions and 49 deletions

View File

@@ -277,7 +277,7 @@ HIDAPI_DriverPS5_IsSupportedDevice(SDL_HIDAPI_Device *device, const char *name,
}
if (SONY_THIRDPARTY_VENDOR(vendor_id)) {
if (device) {
if (device && device->dev) {
if ((size = ReadFeatureReport(device->dev, k_EPS5FeatureReportIdCapabilities, data, sizeof(data))) == 48 &&
data[2] == 0x28) {
/* Supported third party controller */