JibbSmart / JoyShockLibrary

Read DualSense, DualShock 4, JoyCon, and Pro Controller input on PC -- compiled for Windows, but code should work on other platforms.
Other
233 stars 47 forks source link

Bluetooth Dualshock 4 v2 fix & Full Controller Support #24

Closed TauAkiou closed 3 years ago

TauAkiou commented 3 years ago

Addresses Issue #2 & adds lightbar + rumble support for wireless DS4 controllers.

I had realized that while my old v1 controller worked perfectly with JoyShockLIbrary, my v2 controller and Brook XB1 adapter did not work. Some analysis into the issue revealed that the v2 was not entering 0x11 mode, necessary for Gyro support to work.

After looking further at DS4Windows and the hid_sony Linux kernel driver, I came to the following realizations:

Additionally, I also fixed up lightbar and rumble support by analyzing the 0x11 and CRC32 routines for the controller.

After making these changes and doing some testing, JSL now fully supports the DS4 as well as the non-v1 controllers over bluetooth.

JibbSmart commented 3 years ago

Thanks so much! I'm pretty sure both my controllers are also v2, but regardless, the fact that this fixes things on your controllers that weren't working is a good sign. Much appreciated :)