Commit 62670dc3 authored by Greg Geldorp's avatar Greg Geldorp Committed by Alexandre Julliard

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.
parent 01286b97
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment