Tuesday, January 31, 2017

c++ - Supporting Controllers on Mac


I'm currently developing a small, cross-platform game for Windows/OSX. I have XInput support working correctly on the Windows version. I've left off Mac controller support until now and I'm struggling to find an analogous library on OS X.


Does something similar to the XInput API exist for OS X or am I on my own for that?



Answer



I've been looking into this as well and I have yet to find something as clean and simple as XInput on the Mac. A library that's commonly recommended is OIS but it seems like it's not being maintained anymore.



You can also take a look at the game pad implementation in SFML. It has game pad support for Windows, Mac and Linux. I haven't gotten a chance to take the SFML game pad stuff for a test drive yet but I've been impressed with SFML in general.


No comments:

Post a Comment

Simple past, Present perfect Past perfect

Can you tell me which form of the following sentences is the correct one please? Imagine two friends discussing the gym... I was in a good s...