[DINPUT_WINETEST] Sync with Wine 3.0. CORE-14225

This commit is contained in:
Amine Khaldi 2018-01-21 22:27:32 +01:00
parent 0b35adc274
commit c557dfb7b8

View file

@ -19,6 +19,7 @@
#include "precomp.h"
static const HRESULT SetCoop_null_window[16] = {
E_INVALIDARG, E_INVALIDARG, E_INVALIDARG, E_INVALIDARG,
E_INVALIDARG, E_HANDLE, E_HANDLE, E_INVALIDARG,
@ -82,7 +83,6 @@ static void test_acquire(IDirectInputA *pDI, HWND hwnd)
DIPROPDWORD di_op;
DIDEVICEOBJECTDATA mouse_state;
DWORD cnt;
MSG msg;
int i;
if (! SetForegroundWindow(hwnd))
@ -121,12 +121,9 @@ static void test_acquire(IDirectInputA *pDI, HWND hwnd)
hwnd2 = CreateWindowA("static", "Temporary", WS_VISIBLE, 10, 210, 200, 200, NULL, NULL, NULL,
NULL);
ok(hwnd2 != NULL, "CreateWindowA failed with %u\n", GetLastError());
while (PeekMessageA(&msg, 0, 0, 0, PM_REMOVE)) DispatchMessageA(&msg);
hr = IDirectInputDevice_GetDeviceState(pMouse, sizeof(m_state), &m_state);
ok(hr == DIERR_NOTACQUIRED, "GetDeviceState() should have failed: %08x\n", hr);
/* Workaround so we can test other things. Remove when Wine is fixed */
IDirectInputDevice_Unacquire(pMouse);
hr = IDirectInputDevice_Acquire(pMouse);
ok(hr == DIERR_OTHERAPPHASPRIO, "Acquire() should have failed: %08x\n", hr);