Input nowadays

Started by
5 comments, last by TomKQT 11 years, 7 months ago
Hey,
I am wondering what is the best way to get the input for a directx-game. There is directinput, but MS told us to use the windowsmessages as far as I know. Is there any other way to do it, and how do you do it in your own games/stuff?

Ty
Advertisement
Microsoft says we should use RawInput,but I found it to be really troublesome + DirectInput has everything you would ever need and it doesn't seem to cause any noticeable increase in my CPU usage,so I'm sticking to DirectInput :D
I use raw input now. So I register the mouse for instance and subscribe to the MouseInput event and also use windows to get the client position of the mouse.

edit. DirectInput gave me serious problems in fullscreen, i had a thread about the issue on these forums. And since it's not supported anymore and not recommended i ditched it for raw input.
An other vote for raw :-)
I use SDL with Direct3D 9 (or OpenGL if necessary). It creates my window and handles my input, so I don't have to mess with ugly, scary windows code as much! :) Been using this for, I believe, five years now and it's always been a good choice in my book, I'm fairly confident this is one good way of doing it.

I use raw input now. So I register the mouse for instance and subscribe to the MouseInput event and also use windows to get the client position of the mouse.

edit. DirectInput gave me serious problems in fullscreen, i had a thread about the issue on these forums. And since it's not supported anymore and not recommended i ditched it for raw input.


by not supported do you mean that they just don't update it or do you mean that it actualy doesn't run on windows8?
Keyboard & mouse - Windows messages.
Xbox360 compatible gamepads - XInput.
All joysticks, gamepads, wheels etc - DirectInput.

That's how I'm typically doing it and if I'm not wrong, that's also the Microsoft's recommendatio (DirectInput only if XInput cannot be used).

This topic is closed to new replies.

Advertisement