Skip to main content
gamedev.net
🔒 Locked

DInput problem.

Started by Holy Fuzz Dec 28, 2002 at 11:30 AM 0 replies 250+ views
Original Post
Holy Fuzz
Holy Fuzz
I did not have this problem until I upgraded to DX9. Note that I made no changes to ANY of my DirectInput code. Whenever I reset my display mode going from windowed mode to fullscreen mode, any call to Acquire() returns E_ACCESSDENIED, which is not documented in the SDK. This does not happen when resizing the window, changing between display modes, or switching from fullscreen to windowed. It also does not happen when you switch from fullscreen to windowed and BACK from windowed to fullscreen. Any ideas? My code (ignore the ERR macros, I know they work): // Get the keyboard. ERR(kb->Unacquire(), "Unable to unaquire the keyboard."); kb->Release(); ERR(di->CreateDevice(GUID_SysKeyboard, &kb, NULL), "Unable to create the keyboard device."); ERR(kb->SetCooperativeLevel(handle_cur, DISCL_NONEXCLUSIVE | DISCL_FOREGROUND), "Unable to set the keyboard''s cooperation level."); ERR(kb->SetDataFormat(&c_dfDIKeyboard), "Unable to set the keyboard''s data format."); ERR(kb->Acquire(), "Unable to acquire the keyboard.");
Holy Fuzz
Holy Fuzz
Never mind, fixed problem.

Topic Locked

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

Sign in to reply to this topic.