Click here to Skip to main content
15,888,008 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
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.
Posted
Updated 4-May-19 19:44pm
Comments
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.
[no name] 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!
[no name] 5-May-19 23:57pm    
You're welcome.

https://support.xbox.com/en-CA/xbox-on-windows/accessories/connect-xbox-one-controller-to-pc

https://ritchielozada.com/2016/01/16/part-11-using-an-xbox-one-controller-with-unity-on-windows-10/

https://ritchielozada.com/2016/11/21/playstation-4-dual-shock-controller-input-mapping-with-unity-on-windows-10/

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



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900