Original Post
Hi! I get DIERR_OTHERAPPHASPRIO error from LPDIRECTINPUTDEVICE8::Acquire() why? Thanks!
hr = mlpDIKeyboard->GetDeviceData( sizeof(DIDEVICEOBJECTDATA), didod, &dwElements, 0 );if( FAILED(hr) ) { // Error hr = mlpDIKeyboard->Acquire(); while( hr == DIERR_INPUTLOST ) hr = mlpDIKeyboard->Acquire(); // hr may be DIERR_OTHERAPPHASPRIO or other errors. This // may occur when the app is minimized or in the process of // switching, so just try again later return !FAILED(hr); } // keyboard hr = IO_Object->CreateDevice(GUID_SysKeyboard, &IO_KeyboardDevice, NULL); if(FAILED(hr)){ e2::Error("Error(1):", ERR_LEVEL0); return -1; } hr=IO_KeyboardDevice->SetDataFormat( &c_dfDIKeyboard ); if(FAILED(hr)){ e2::Error("Error(2):", ERR_LEVEL0); return -1; } hr = IO_KeyboardDevice->SetCooperativeLevel(MainWindowHandle, DISCL_FOREGROUND | DISCL_NONEXCLUSIVE); if(FAILED(hr)){ e2::Error("Error(3):", ERR_LEVEL0); return -1; } IO_KeyboardDevice->Acquire(); // ***
// Blabla initialization of the keyboard device, setting buffer size etc.// Try to aqcuirehr = mlpDIKeyboard->Acquire();if (FAILED(hr) && hr != DIERR_OTHERAPPHASPRIO){ // Error here (not shown)}This topic has been locked by a moderator. New replies are not allowed.
With your permission, GameDev.net uses analytics cookies to understand how people use the platform. You can accept analytics or continue with necessary cookies only. Learn more