Sign in to follow this  

Windows Input vs. DirectInput

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

This topic is 4202 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.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this