Skip to content
This repository has been archived by the owner on Jun 15, 2023. It is now read-only.

Commit

Permalink
Fixed mismatch of 3rd party Pro controllers
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
lilobet committed Nov 6, 2020
1 parent ca684ea commit 38a4e0b
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/hid-nintendo.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 38a4e0b

Please sign in to comment.