Skip to main content
gamedev.net
🔒 Locked

DirectInput debugging problem

Started by Tarains 3 replies 700+ views
Original Post
Tarains
Tarains
Hi, I've got a problem with debugging while using DirectInput. Initializing the LPDIRECTINPUT8 object works fine but when I add these 4 lines to the code (initializing the keyboard):
Input.GetInput ()->CreateDevice (GUID_SysKeyboard, &m_lpDIDevice, NULL);
m_lpDIDevice->SetDataFormat (&c_dfDIKeyboard);
m_lpDIDevice->SetCooperativeLevel (Window.GetHWND (), DISCL_FOREGROUND | DISCL_NONEXCLUSIVE);
m_lpDIDevice->Acquire ();
and start debugging and click 'Break All', a messagebox 'No symbols are loaded for any call stack frame. [depressed] The source code cannot be displayed.' appears (oh, I didn't mention I use VC++ 2008 EE). When I run it in the release mode, I can even update the keyboard, update the mouse, do just everything and it works ok. But I can't debug it! I tried setting Debug mode in the DX Control Panel but it doesn't help. Are you having any difficulties debugging with DirectInput or it's only me? Any suggestions? [sad] Thanks in advance
Evil Steve
Evil Steve
Yet another reason to never use DirectInput for mouse or keyboard input.

The "No symbols are loaded for any call stack frame" message is because when you hit "Break all", the thread you break in might not be the current thread, and also, it might not be in your code - it could be in the middle of an OS call.
Tarains
Tarains
I considered abandonment of DirectInput before and now I see I was right... Thanks for the link, though I got another stupid question. [smile] How can I prevent resizing my window in the fullscreen mode when I'm using WinAPI mouse handling? Will a proper Windowstyle do (WS_POPUP or something like that) and not let the cursor changing to this 'resizing arrow'?
Evil Steve
Evil Steve
Quote:
Original post by Tarains
I considered abandonment of DirectInput before and now I see I was right... Thanks for the link, though I got another stupid question. [smile] How can I prevent resizing my window in the fullscreen mode when I'm using WinAPI mouse handling? Will a proper Windowstyle do (WS_POPUP or something like that) and not let the cursor changing to this 'resizing arrow'?
Yup, WS_POPUP should be used for fullscreen windows.
Tarains
Tarains
Ok, thanks

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.