dinput/tests: Skip acquire tests when not running in the foreground.
If our window isn't the foreground window, we'll never be able to successfully Acquire with SetCooperativeLevel DISCL_FOREGROUND in effect.
This commit is contained in:
parent
01286b97e3
commit
62670dc39e
|
@ -73,6 +73,12 @@ static void test_acquire(LPDIRECTINPUT pDI, HWND hwnd)
|
|||
DIMOUSESTATE m_state;
|
||||
HWND hwnd2;
|
||||
|
||||
if (! SetForegroundWindow(hwnd))
|
||||
{
|
||||
skip("Not running as foreground app, skipping acquire tests\n");
|
||||
return;
|
||||
}
|
||||
|
||||
hr = IDirectInput_CreateDevice(pDI, &GUID_SysMouse, &pMouse, NULL);
|
||||
ok(SUCCEEDED(hr), "IDirectInput_CreateDevice() failed: %08x\n", hr);
|
||||
if (FAILED(hr)) return;
|
||||
|
|
Loading…
Reference in New Issue