Electronicks / JoyShockMapper

A tool for PC gamers to play games with DualShock 4s, JoyCons, and Pro Controllers. Gyro aiming, flick stick.
Other
332 stars 20 forks source link

JSM Not properly compatible with BINBOK Joycon #75

Open GammaLyrae opened 2 years ago

GammaLyrae commented 2 years ago

Pretty sure this is down to how JSL/SDL2 detects the controller type.

Vendor shows up as vid == 0x057e and PID = 2009 for both the left and right BINBOK Joycon. However, they're both still detected as distinct devices with appropriate names in Windows as their friendly names are set to allow the user to differentiate the two in the control panel, with L and R markings similar to official Nintendo Joycon.

As the PID code in JSL/SDL2 doesn't get a match on PID 2006 or 2007, but does get a match on the hardware ID, it appears to default to treating them as Nintendo Switch PRO controllers. They can map reasonably well to a mouse and keyboard (every button does what you expect, except for the loss of SL and SR on each joycon, as these don't exist as inputs on a PRO controller). As soon as you try to map any virtual controller, it creates two instances of the controller, mapping the LEFT controller to a virtual controller containing only the left half inputs, and the RIGHT controller to a separate controller containing only the RIGHT half inputs.

The BINBOK Joycon are also detected as Nintendo PRO Controllers in steam (suggesting that valve may be using similar methods to determine what kind of Nintendo controller is plugged in), but it's notable that reWASD detects the BINBOK Joycon as two separate controllers that can be merged into one unit for remapping as a set, including remapping the left and right physical controllers to a single virtual controller.

Possible suggested workarounds:

Allow the user to FORCE a merge of two controllers into one, even if it may not make sense to do so at a glance (ie, appear to merge two wireless pro controllers) - you would still be missing SL/SR support, but it would be better than nothing. Currently attempting to force this as a merge creates THREE total virtual controllers, one with the left half mapping, one with the right half mapping, and a third virtual controller that doesn't pass any inputs through at all Directly add support for the BINBOK controllers, detecting through some other string in the hardware (as both report identical VID and PID strings), this would allow the user to MERGE or SEPARATE them just like official Joycon, and would restore SL/SR support for each controller. If there's something I can do to help find a way to identify the BINBOK controllers vs official controllers, let me know. I own a full set of official joycon, a full set of BINBOK Joycon, an official PRO controller, and a licensed Power-A pro controller.