From 38a4e0b8816fac44c55deed0e177f38cf01856ed Mon Sep 17 00:00:00 2001 From: lilobet Date: Fri, 6 Nov 2020 15:04:50 +0100 Subject: [PATCH] Fixed mismatch of 3rd party Pro controllers Some 3rd party Pro controllers report product ID 0x2006 and get missidentified as "Left Joycon". While most functions work, the only thing that this disables is the left trigger buttons. --- src/hid-nintendo.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/hid-nintendo.c b/src/hid-nintendo.c index 5d47968..28e5e7a 100644 --- a/src/hid-nintendo.c +++ b/src/hid-nintendo.c @@ -1513,6 +1513,15 @@ static int joycon_input_create(struct joycon_ctlr *ctlr) int ret; int i; + /*Some 3rd party Switch Pro controllers report Product ID 0x2006 + instead of 0x2009. + Check reported controller type and force Product ID to PROCON. + */ + if(ctlr->ctlr_type == JOYCON_CTLR_TYPE_PRO && + ctlr->hdev->product != USB_DEVICE_ID_NINTENDO_PROCON){ + ctlr->hdev->product = USB_DEVICE_ID_NINTENDO_PROCON; + } + hdev = ctlr->hdev; switch (hdev->product) {