Jump to content
  • Advertisement
Sign in to follow this  
Haytil

Gamepad with DirectInput

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

Can anyone point me to a good tutorial for programming the ability to use a gamepad (i.e., Microsoft Sidewinder) with DirectInput in my game? Thanks. -Gauvir_Mucca

Share this post


Link to post
Share on other sites
Advertisement
im not completly sure on this i only just covered Direct input yestarday and got my keyboard mouse and gamepad. from what i can remember:
search for devices
create the device
SetCooperativeLevel
SetDataFormat
Acquire
pol the device
get information from devise

when finished:
Unacquire
release

think thats the right stages i suggest you pick a book on directx that you could read easily thats what i did i got windows game programming for dummies it covers everything from windows to directx and even show how to make a directx engine.

good luck.

Share this post


Link to post
Share on other sites
Just have a look at the Documentation that comes with DirectX, theres some straightforward tutorials that explain pretty much everything you need to know for using directinput with gamepads.

Share this post


Link to post
Share on other sites
If you already know how to use the keyboard any mouse, it's fairly straightforward to look it up in the docs, as it works mostly similarly. The main difference is that you can't just ask for the default device and use that, you have to enumerate the devices available and offer the user the ability to choose one. You can also use the action mapper if you want a sort of packaged solution to that type of thing.
I'd advise that you get familiar with using the DirectX documentation anyway, as it means you can learn how to use something independently of whether there's a good tutorial on it or not.

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!