Jump to content
  • Advertisement
Sign in to follow this  

DInput, after working, stops working.

This topic is 4386 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

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
Sign in to follow this  

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!