Archived

This topic is now archived and is closed to further replies.

yanuart

Debugging n DirectInput

Recommended Posts

I''m having a hard time debugging my program if I''ve allready set my DirectInput object and acquire the input device (keyboard), if u know what I mean.. any better ways to do this ??

Share this post


Link to post
Share on other sites
Can you be more specific?

If you get a delay whenever you step in debugger, you should use DI emulation. Check the box in DINPUT control panel, or (which is what I do) use GUID_SysKeyboardEm and GUID_SysMouseEm if _DEBUG is defined.

Share this post


Link to post
Share on other sites
I mean.. if I set up a breakpoint in my code and then check if there was an input from my device.. how come the input device returned the wrong devicestate

Share this post


Link to post
Share on other sites
Did you set DISCL_BACKGROUND (or DISCL_EXCLUSIVE)? If not, the debugger is the foreground application so it gets the device. And if you''re debugging the mouse and/or keyboard - forget it. Better to dump your values to a file/screen and examine that instead.

[ GDNet Start Here | GDNet Search Tool | GDNet FAQ | MS RTFM [MSDN] | SGI STL Docs | Google! ]
Thanks to Kylotan for the idea!

Share this post


Link to post
Share on other sites