Commit b3e1fd97b84d17ac238f14131d24360c2d825019

Sam Lantinga 2023-06-12T16:57:41

Fixed enumerating Steam Controllers on iOS (cherry picked from commit dec0dbff13d4091035209016eb2d0dd82c9aba58)

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
diff --git a/src/hidapi/ios/hid.m b/src/hidapi/ios/hid.m
index 5584570..8ebfdbe 100644
--- a/src/hidapi/ios/hid.m
+++ b/src/hidapi/ios/hid.m
@@ -848,8 +848,8 @@ struct hid_device_info  HID_API_EXPORT *hid_enumerate(unsigned short vendor_id, 
 		}
 	}
 
-	if ( ( vendor_id == 0 && product_id == 0 ) ||
-		 ( vendor_id == VALVE_USB_VID && product_id == D0G_BLE2_PID ) )
+	if ( ( vendor_id == 0 || vendor_id == VALVE_USB_VID ) &&
+	     ( product_id == 0 || product_id == D0G_BLE2_PID ) )
 	{
 		HIDBLEManager *bleManager = HIDBLEManager.sharedInstance;
 		[bleManager updateConnectedSteamControllers:false];