Commit b880709e9c30cf26c7ba85ac4446b937c3f98410

Sam Lantinga 2022-08-12T18:11:27

Added libusb hack for Gamesir-G3w which needs the same adjustment as the Hori controllers

1
2
3
4
5
6
7
8
9
10
11
12
13
14
diff --git a/src/hidapi/libusb/hid.c b/src/hidapi/libusb/hid.c
index d2c407c..dbcd4fa 100644
--- a/src/hidapi/libusb/hid.c
+++ b/src/hidapi/libusb/hid.c
@@ -1087,7 +1087,8 @@ static int SDLCALL read_thread(void *param)
 
 static void init_xbox360(libusb_device_handle *device_handle, unsigned short idVendor, unsigned short idProduct, struct libusb_config_descriptor *conf_desc)
 {
-	if (idVendor == 0x0f0d && idProduct == 0x00dc) {
+	if ((idVendor == 0x05ac && idProduct == 0x055b) /* Gamesir-G3w */ ||
+	    (idVendor == 0x0f0d && idProduct == 0x00dc) /* HORIPAD */) {
 		unsigned char data[20];
 
 		/* The HORIPAD FPS for Nintendo Switch requires this to enable input reports.