Sign in to follow this  
Anand Baumunk

Input nowadays

Recommended Posts

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

Share this post


Link to post
Share on other sites
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. Edited by Gavin Williams

Share this post


Link to post
Share on other sites
I use [url="http://www.libsdl.org/"]SDL[/url] 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.

Share this post


Link to post
Share on other sites
[quote name='Gavin Williams' timestamp='1347881168' post='4980842']
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.
[/quote]

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?

Share this post


Link to post
Share on other sites
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). Edited by Tom KQT

Share this post


Link to post
Share on other sites

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