Should I use something other then Direct Input?

Started by
4 comments, last by Madhed 13 years, 6 months ago
I've recently been trying again to learn Direct X (and being a lot more successful then I was a few years back). Back when I first tried, I had never heard anyone complaining about Direct Input. But now I have seen a few people tell me to stay away from it for a better input method.

Well then could I get a explanation for why this might be? and a possible libraries I should use in place of Direct Input?

Thanks
Advertisement
Quote:Original post by ssdko2004
could I get a explanation for why this might be?


Link.
Ok those are some very good reasons. I just need to know what to use instead.
Quote:Original post by ssdko2004
Ok those are some very good reasons. I just need to know what to use instead.
Start here. Each type of input listed (keyboard, mouse, raw) has its own page. Each of those pages list an about page, using page, and reference page. The using page has example code.

As an aside, one trick I've seen with a mouse is to set the mouse curser position to the center of the screen at program start. When a mouse move message is received calculate the distance the mouse moved away from the center of the screen. Then reset the mouse curser position back to the center of the screen and wait for the next mouse move message. You probably need to accumlate total mouse movement made since the last update though.

You'll need SetCursorPos to do this. Hope this helps.

C++: A Dialog | C++0x Features: Part1 (lambdas, auto, static_assert) , Part 2 (rvalue references) , Part 3 (decltype) | Write Games | Fix Your Timestep!

Ahh so I can just stick with Windows messages.

Thanks for the help
Quote:Original post by nobodynews
As an aside, one trick I've seen with a mouse is to set the mouse curser position to the center of the screen at program start. When a mouse move message is received calculate the distance the mouse moved away from the center of the screen. Then reset the mouse curser position back to the center of the screen and wait for the next mouse move message. You probably need to accumlate total mouse movement made since the last update though.


That or RAW input.

http://msdn.microsoft.com/en-us/library/ms645536%28v=VS.85%29.aspx

Haven't used it myself yet but seems to be pretty straight forward.

This topic is closed to new replies.

Advertisement