osx - Using DualShock 4 from OS X -
on whim bought sony dualshock 4 wireless game controller. pairing controller mac easy. controller works expected in openemu.
now want use controller in own game. in xcode playground, tried this:
import cocoa; import gamecontroller; print(gccontroller.controllers()) print(gccontroller.controllers().count)
the output is: [] 0
this means dualshock controller wasn't registered gccontroller.
should it?
is there kind of initialization needs done before invoking controllers?
an example objective-c or swift welcome.
there's tutorial here: http://www.raywenderlich.com/forums/viewtopic.php?f=21&t=10339 seems suggest dualshock 4 isn't supported gamecontroller framework.
see apple documentation, begin here: https://developer.apple.com/library/mac/documentation/servicesdiscovery/conceptual/gamecontrollerpg/discoveringcontrollers/discoveringcontrollers.html explains how discover , connect controllers.
Comments
Post a Comment