Jump to content
  • Advertisement
Sign in to follow this  
prelud

Joystick troubles

This topic is 4415 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 everybody, Here is my problem, I want to be able to get input from "ps2 type" joystick / pad. I mean any device which has left and right stick + 4 buttons - for example Thrustmaster DT Rumble or XBOX 360 Controller. I can enum buttons and axis of any device but the problem is that each device with such buttons and sticks configuration returns different things in DIJOYSTATE2. For example the Thrustmaster returns right stick UP/DOWN in DIJOYSTATE2.rglSlider[0] and LEFT/RIGHT in DIJOYSTATE2.lRz, while the XBOX controller returns the same data in lRx and lRy. This problem exists also about the buttons - the START button on Thrustmaster in button10, while on the XBOX controller the START button is button8. So, my question is does anybody have any idea how to unify the input from different types of devices? Thank you

Share this post


Link to post
Share on other sites
Advertisement
don't use directinput constants in you programme directly, use a consol to configure the user inputs and then use these in your own array of keys,

this is the legacy method way to do it in games, and the catch is that user can set up the button from which he wants to play.

bye -
rk - the one

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!