[MDX] Event driven keyboard input.

Started by
1 comment, last by Thevenin 18 years, 4 months ago
I'm having a fair bit of trouble with DirectInput. I originally coded a very nice GetCurrentKeyboardState() implementation for my game, but than realised that it would skip keys if the framerate wasn't high (Since my game requires typing, this isn't suited). I than started working around a bit with GetBufferedData(), but I'm having alot of problems working with it. Inaddition, the December MDX SDK doesn't have one example on mouse input with buffered data. Could anyone point in the right direction as to how I should capture input?
Advertisement
Managed DirectX more or less works exactly the same way as unmanaged DirectX when it comes down to it. I recommend just looking at the example for doing buffered input in the C++ DirectX docs, then doing the same thing using the managed version. I don't think there are any drastic differences in the managed version that would require you to do things differently.
It appears that Windows Forms is more than capable of providing all the keyboard and mouse control needed for my game. Whoohoo!

I may use GetKeyboardState() api just to prevent keys from being held down during switching windows, but so far, it hasn't shown to be a problem.

This topic is closed to new replies.

Advertisement