Module: wine Branch: master Commit: 62670dc39e00fd7855e26d46771fa6d10104c690 URL: http://source.winehq.org/git/wine.git/?a=commit;h=62670dc39e00fd7855e26d4677...
Author: Greg Geldorp ggeldorp@vmware.com Date: Thu Jan 6 13:10:27 2011 +0100
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.
---
dlls/dinput/tests/mouse.c | 6 ++++++ 1 files changed, 6 insertions(+), 0 deletions(-)
diff --git a/dlls/dinput/tests/mouse.c b/dlls/dinput/tests/mouse.c index 09b2b27..25a9a5e 100644 --- a/dlls/dinput/tests/mouse.c +++ b/dlls/dinput/tests/mouse.c @@ -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;