Jump to content
  • Advertisement
Sign in to follow this  
FrancoisGibon

using a dualshock 2 via USB in a C++ program

This topic is 2390 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 everyone, I'm learning C++ and making good progress, but I can't find how to detect my controller input: I have a dualshock 2 plugged to my PC with a USB adapter, and it works well in games and can even be detected as a 360 controller with a dll, but I tried to follow the tutorials and my controller was never detected in C++. if I know the USB port my controller is plugged to, is there a "light" code to get the buttons pressed and thumbstick values in my C++ program? thanks

Share this post


Link to post
Share on other sites
Advertisement
but I tried to follow the tutorials and my controller was never detected in C++.


What tutorials do you mean? What did you try to read values from the controller?
"C++" on its own have no means to detect and access such devices, how exactly did you make your attempt?

Btw, besides DirectInput you can also use Xinput, which is much (and I mean MUCH) easier to get working, especially if you are a C++ beginner, but works only with Xbox 360 compatible devices (which your controller is, as you said).

Further reading about DirectInput vs Xinput:
http://msdn.microsof...28VS.85%29.aspx

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!