Jump to content
  • Advertisement
Sign in to follow this  
thundersteel

Xbox Controller Input in C++ and C# on Mac Os X

This topic is 1183 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

Hello everyone, I am a computer science student on holidays and I am learning C# developing a RPG in-console game in C# and C++ to see differences between them and also improve my programming skills on C++. The game uses three commands so far, attack, defend and see enemy's health using simple keyboard input (typing 1 to attack, 2 to defend and 3 to defend) but I want one more step further and I want to use the Xbox Controller Input for that, but I am stuck. I have seen the XNA framework for C# and the windows.h library for C++ but I am using a Macbook Pro and I don't know to use it.

 

I have installed MonoGame on Xamarin but I haven't used Xamarin. Instead I have been using TextWrangler for editing and g++ and mcs for compiling on command line. Could I use these tools somehow to compile and execute the MonoGameFramework? How I use windows.h on Mac without VMs?

 

Thank you very much, sorry for my English.

Share this post


Link to post
Share on other sites
Advertisement

Does an xbox controller even work with a mac, I wouldnt be surprised if there wasn't a driver for it. If there is no driver and I checked there is no official one this might become hard to do. Other than that it seems you need to figure out how to use a controller/gamepad on OSX from C# or C++, I am betting there will be some stuff for controller support in the Mac OSx SDK.

Share this post


Link to post
Share on other sites

windows.h library for C++ but I am using a Macbook Pro and I don't know to use it.

windows.h is a Windows thing, not a Mac thing. If you really wanted to get down-and-dirty, you'd write a user-space HID driver, but that's not what you want to do.

Save yourself years worth of trouble, and use a cross-platform framework like GLFW, SFML, or SDL, all of which provide out-of-box support for the XBox 360 Controller (via their respective 'joystick' APIs).

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.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!