Jump to content
  • Advertisement
Sign in to follow this  
guest42

USB controller

This topic is 3968 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi! I am currently programming a 2D game on Mac OS X using C/OpenGL with XCode. I have a simple USB controller (from retrozone) that I would like to be able to use in my game. How can I achieve this? Is there a library or interface I can use to make this possible? Later I would like to be able to port this game to Linux and Windows as well, so any information on those would also be helpful. Thanks :)

Share this post


Link to post
Share on other sites
Advertisement
Are you using just raw Carbon/AGL? If so, you might have to look at how the HID Manager does stuff. I think there's a page on the Apple Developer site with some example code for USB joysticks.

I'd consider just doing it with SDL and using the SDL joystick handling. That way Windows/Linux porting is easy.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!