Sign in to follow this  
theMadHatter

DInput, after working, stops working.

Recommended Posts

Hi. With directInput, I'm having some trouble. When I start the program all is dandy. I have a messagebox hooked to a mouse key press. When I press that the message box comes up. But then
hr = m_keyboard->GetDeviceState(sizeof(UCHAR[256]), (LPVOID)keystate);
if (FAILED(hr))
   MessageBox(NULL, "getdevicestate keyboard", "ERROR", MB_OK);

this errors. It only happens directly after I press something on the mouse. I then added a messagebox to a keyboard button press. So after I press that the same thing happens. It also spews out random messages. Like.. when the messageboxes come up some are that of a keyboard button being pressed, even though that is not the case. So I then tried rearranging the order of the GetDeviceState was. The mouse first this time. But the keyboard is still the only error shown. Debugging doesn't help. Thanks.

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