marcowindt / ds4macos

DSU Server for (DualShock 4 / DualSense) controllers for MacOS. To be used with the Dolphin emulator.
MIT License
54 stars 6 forks source link

Pragram crashed when joycon connected to mac with the first release version #2

Closed forrany closed 3 years ago

forrany commented 3 years ago

HI, I update my mac os to 11.2.3 (20D91), just to fulfil the requirements of first release version.

But unfortunately, the pragram will crash as long as my joycon connected to mac by bluetooth, any idea to solve this problem? Thanks

image

Image Translation:

"ds4macos" Quit unexpectedly Tap "Reopen" to open the app again. Tap "Report" to view more detailed information and send the report to Apple.

reopen report... ignore

Microflamer commented 3 years ago

I have this issue to. It would be nice if this was fixed as I really want to use joycons with Dolphin. There is some demand for it as well:https://www.reddit.com/r/DolphinEmulator/comments/kbgohx/is_it_possible_to_use_joycons_on_mac_and_use/

https://www.reddit.com/r/DolphinEmulator/comments/jr4o71/help_how_can_i_connect_joycons_to_dolphin_mac/

marcowindt commented 3 years ago

Sorry for the late response!

The mac OS GameController Framework does support the JoyCon controller buttons, but it will not allow you to read the motion input (gyroscope/accelerometer). The program crashed in attempt on reading the motion sensor data from the device. Unfortunately there is no fix for this at the moment to get motion sensor data using the GameController Framework. (Latest commit https://github.com/marcowindt/ds4macos/commit/6313f64f5fb0154c95a7707b68731f6d7626f4cf fixes the program crashing, but no sensor data)

However, I found a library on github JoyConSwift which allows you to read the motion sensor data without using the GameController Framework. I created a simple app joy4macos which uses this library to send motion data to Dolphin, but it's still very buggy and I don't actually own any JoyCon controllers myself to run more tests. I will run some more tests when I get my hands on one again.