The game pad is not recognized for Mac

I want to create a mac game to play with the gamepad.
I connected xbox 360 gamepad to mac, and installed 360Controller to enabled it.

I opened build/cocos2d_tests.xcodeproj and ran game-controller-test Mac.
However, the gamepad is not recognized and remains displayed as “disconnected” all the time.

How can I make the gamepad recognized?
Or should I use a gamepad other than xbox 360?

Thank you.

1 Like

Same problem here. And I use the same driver as yours.

It seems that only MFi compatible controller can be used.

glfw is already integrated… so its not hard to include controller support

1 Like

just follow this video…

1 Like

cool, I will watch this. Perhaps we need some documentation on game controllers. I don’t think we have much at this time besides release notes and cpp-tests.

I’ve got a few modules that I will upload on git… soon as I’m done with my game.

Includes - Buttons, Popups , controller classes etc

1 Like

I got to do research a bit. While we could wait for @bllalmirza to upload the code.

There’re options to look at

  • someone added controller support via SDL in this commit. This modified code on top of cocos2dx dated back since Jun 10, 2016.
  • GAInput - anyway I have no idea which backend it uses. Last update dated back to 3 months ago on github. But seems overkill as it is unified input which covers touching input, mouse, and keyboard as well.

Yes, as @bllalmirza suggests, glfw is already in backend of cocos2dx. It’s better to look into that direction.

adding controller support via glfw should only take 3-4 hours tbh