Commit 5c15e81cfbe473671bf6829039fbc927e2b0ad1c

Sam Lantinga 2019-08-22T15:58:00

Prevent the SPEEDLINK COMPETITION PRO joystick from switching into Android controller mode when enumerated over HID on Windows 10.

diff --git a/src/hidapi/windows/hid.c b/src/hidapi/windows/hid.c
index 275e024..f706911 100644
--- a/src/hidapi/windows/hid.c
+++ b/src/hidapi/windows/hid.c
@@ -298,8 +298,19 @@ int HID_API_EXPORT hid_exit(void)
 
 int hid_blacklist(unsigned short vendor_id, unsigned short product_id)
 {
-	return vendor_id == 0x1B1C && // (Corsair)
-		product_id == 0x1B3D; // Gaming keyboard?  Causes deadlock when asking for device details
+	// Corsair Gaming keyboard - Causes deadlock when asking for device details
+	if ( vendor_id == 0x1B1C && product_id == 0x1B3D )
+	{
+		return 1;
+	}
+
+	// SPEEDLINK COMPETITION PRO - turns into an Android controller when enumerated
+	if ( vendor_id == 0x0738 && product_id == 0x2217 )
+	{
+		return 1;
+	}
+
+	return 0;
 }
 
 struct hid_device_info HID_API_EXPORT * HID_API_CALL hid_enumerate(unsigned short vendor_id, unsigned short product_id)