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

Commit

Permalink
Merge pull request #23 from Lilolbet/master
Browse files Browse the repository at this point in the history
Fixed mismatch of 3rd party Pro controllers
  • Loading branch information
nicman23 authored Nov 11, 2020
2 parents ca684ea + 38a4e0b commit 5371d38
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 5371d38

Please sign in to comment.