On a whim I bought a Sony DualShock 4 Wireless game controller. Pairing the controller with my mac was easy. The controller works as expected in OpenEmu.
Now I want to use the controller in my own game. In an XCode playground, I tried this:
import Cocoa;
import GameController;
print(GCController.controllers())
print(GCController.controllers().count)
The output is: [] 0
This means that the DualShock controller wasn't registered as a GCController.
Should it?
Is there some kind of initialization that needs to be done before invoking controllers?
An example is Objective-C or Swift would be welcome.