Click here to Skip to main content
14,271,310 members
Rate this:
Please Sign up or sign in to vote.
See more:
Hello Folks!

I am working on a course project at a university where we need to receive input from a dualshock in our C++ program to then do something with it, but that is not from that story. I've researched a few options and the farther I looked the more confused I got. I was looking for your help in this area. I was hoping somebody explains to me the process of interacting with gamepads from first principles, what most popular options for C++ are and, finally, a few words about how to implement it with a ps4 controller. I have so far found out about Microsoft XInput API which (if I got it) is a more recent alternative of DirectInput. I looked at a few code examples and got lost lost.

Any reference, recommended books, tutorials, links, explanations, any help will be 100% useful and appreciated, so please throw it all at me. I am trying to understand it in the first place. Thank you in advance.

What I have tried:

So as I sad I read a couple of articles about XInput and its predecessor DirectInput. In theory everything feels fine, but in practices I didn't get any of the tutorials or sample codes.
Updated 4-May-19 19:44pm
Richard MacCutchan 5-May-19 3:59am
This is the Quick Answers forum, there is nether the time nor the space to teach you this subject. If you cannot find any information from Google then you need to discuss with your course tutor.
Gerry Schmitz 5-May-19 10:18am
Start with an XBox controller; it works out of the box with Windows 10. UWP has the "input" namespace (and the "pointer" is what used to be the mouse).
Grigorii Mordkovich 5-May-19 17:36pm
Thank you very much for your advice!
Gerry Schmitz 5-May-19 23:57pm
You're welcome.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100