Jump to content
  • Advertisement
Sign in to follow this  
NickGravelyn

Windows Input vs. DirectInput

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

Which one is preferred for games? I'm working on an event system and I'm not sure whether or not to stick with my DirectInput devices and simply poll them and update the event system, or to simply route any Windows events into my events and use them. It seems like Windows' event system would be nicer being as I don't have to poll the device each frame, but I don't know if there actually is any real overhead from using the DirectInput devices. I like using DirectInput for a mouse more, but the keyboard seems trivial. What are people's thoughts on this?

Share this post


Link to post
Share on other sites
Advertisement
Good to know. I was planning on using XInput to support the 360 controllers, but I hadn't heard of Raw Input. Time to start learning another API...

Share this post


Link to post
Share on other sites
DirectInput uses RawInput for keyboard and mouse, so you can likely do better by using it directly. In fact, DirectInput adds latency that you won't be getting when using RawInput directly.

RawInput has been available for quite a while now, so it's a pretty compatible route to go, too.

Meanwhile, XInput is great and simple to use, but is not installed on most machines. Thus, you have to either bundle the XInput installer with your installer (just like you'd do for D3DX), or you have to use LoadLibrary() to load XInput.dll instead of hard-linking.

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!