Jump to content
  • Advertisement
Sign in to follow this  
bsh_aoa

Why do we need DInput?

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

If we only process keyboard and mouse, do we need Dinput? We can process WM_KEYXXX and WM_MOUSEXXX. who can explain it? thanks.

Share this post


Link to post
Share on other sites
Advertisement
No, you don't need DirectInput. In fact, Microsoft now recommends WM_INPUT over DirectInput.

Share this post


Link to post
Share on other sites
DInput can be used for several devices other than the keyboard and mouse. Joysticks, gamepads, steering wheels, etc are definitely prime examples. The XBox 360 controller can be used too with XInput which is soon replacing DInput.

Share this post


Link to post
Share on other sites
I don't remember if I ever read about DI as obsolete technology but there's a fact:
Quote:
From IDirectInput8::EnumDevices
On Microsoft Windows XP, DirectInput enumerates only one mouse and one keyboard device, referred to as the system mouse and the system keyboard. These devices represent the combined output of all mice and keyboards respectively on a system. For information about how to read from multiple mice or keyboards individually on Windows XP, see the WM_INPUT documentation.

The only serious advantage I found in DI was about having multiple devices attached. If this doesn't work anymore, then it's no more useful for me.

Share this post


Link to post
Share on other sites
Quote:
Original post by Krohm
I don't remember if I ever read about DI as obsolete technology


The main reccomendation was that if you are just using Mouse and Keyboard, use WM_INPUT. If you need Joysticks, then DI is fine for that, but only use it for that. Here's the link .

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!