mirror of
https://github.com/reactos/reactos.git
synced 2024-10-01 06:57:08 +00:00
[DINPUT_WINETEST] Sync with Wine Staging 1.7.47. CORE-9924
svn path=/trunk/; revision=68520
This commit is contained in:
parent
016d59d5d7
commit
cc62311c13
|
@ -540,7 +540,6 @@ static BOOL CALLBACK EnumJoysticks(const DIDEVICEINSTANCEA *lpddi, void *pvRef)
|
|||
dip_gain_set.diph.dwHeaderSize = sizeof(DIPROPHEADER);
|
||||
dip_gain_set.diph.dwObj = 0;
|
||||
dip_gain_set.diph.dwHow = DIPH_DEVICE;
|
||||
dip_gain_set.dwData = 10000;
|
||||
dip_gain_get.diph.dwSize = sizeof(DIPROPDWORD);
|
||||
dip_gain_get.diph.dwHeaderSize = sizeof(DIPROPHEADER);
|
||||
dip_gain_get.diph.dwObj = 0;
|
||||
|
|
|
@ -95,6 +95,27 @@ static void acquire_tests(IDirectInputA *pDI, HWND hwnd)
|
|||
for (i = 0; i < sizeof(custom_state) / sizeof(custom_state[0]); i++)
|
||||
ok(custom_state[i] == 0, "Should be zeroed, got 0x%08x\n", custom_state[i]);
|
||||
|
||||
/* simulate some keyboard input */
|
||||
SetFocus(hwnd);
|
||||
keybd_event('Q', 0, 0, 0);
|
||||
hr = IDirectInputDevice_GetDeviceState(pKeyboard, sizeof(custom_state), custom_state);
|
||||
ok(SUCCEEDED(hr), "IDirectInputDevice_GetDeviceState() failed: %08x\n", hr);
|
||||
if (!custom_state[0])
|
||||
win_skip("Keyboard event not processed, skipping test\n");
|
||||
else
|
||||
{
|
||||
/* unacquiring should reset the device state */
|
||||
hr = IDirectInputDevice_Unacquire(pKeyboard);
|
||||
ok(SUCCEEDED(hr), "IDirectInputDevice_Unacquire() failed: %08x\n", hr);
|
||||
hr = IDirectInputDevice_Acquire(pKeyboard);
|
||||
ok(SUCCEEDED(hr), "IDirectInputDevice_Acquire() failed: %08x\n", hr);
|
||||
hr = IDirectInputDevice_GetDeviceState(pKeyboard, sizeof(custom_state), custom_state);
|
||||
ok(SUCCEEDED(hr), "IDirectInputDevice_GetDeviceState failed: %08x\n", hr);
|
||||
for (i = 0; i < sizeof(custom_state) / sizeof(custom_state[0]); i++)
|
||||
ok(custom_state[i] == 0, "Should be zeroed, got 0x%08x\n", custom_state[i]);
|
||||
}
|
||||
keybd_event('Q', 0, KEYEVENTF_KEYUP, 0);
|
||||
|
||||
if (pKeyboard) IUnknown_Release(pKeyboard);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue