[DINPUT_WINETEST] Sync with Wine Staging 3.9. CORE-14656

This commit is contained in:
Amine Khaldi 2018-05-27 03:58:11 +01:00
parent e2ded18d65
commit 979d53be2a
2 changed files with 213 additions and 3 deletions

View file

@ -165,7 +165,7 @@ else {
hr = IDirectInputDevice_GetDeviceData(pMouse, sizeof(mouse_state), &mouse_state, &cnt, 0);
ok(hr == S_OK && cnt > 0, "GetDeviceData() failed: %08x cnt:%d\n", hr, cnt);
/* Check for buffer owerflow */
/* Check for buffer overflow */
for (i = 0; i < 6; i++)
mouse_event(MOUSEEVENTF_MOVE, 10 + i, 10 + i, 0, 0);
@ -175,6 +175,27 @@ else {
cnt = 1;
hr = IDirectInputDevice_GetDeviceData(pMouse, sizeof(mouse_state), &mouse_state, &cnt, 0);
ok(hr == DI_OK && cnt == 1, "GetDeviceData() failed: %08x cnt:%d\n", hr, cnt);
/* Check for granularity property using BYOFFSET */
memset(&di_op, 0, sizeof(di_op));
di_op.diph.dwHow = DIPH_BYOFFSET;
di_op.diph.dwObj = DIMOFS_Y;
di_op.diph.dwSize = sizeof(DIPROPDWORD);
di_op.diph.dwHeaderSize = sizeof(DIPROPHEADER);
hr = IDirectInputDevice_GetProperty(pMouse, DIPROP_GRANULARITY, &di_op.diph);
/* Granularity of Y axis should be 1! */
ok(hr == S_OK && di_op.dwData == 1, "GetProperty(): %08x, dwData: %i but should be 1.\n", hr, di_op.dwData);
/* Check for granularity property using BYID */
memset(&di_op, 0, sizeof(di_op));
di_op.diph.dwHow = DIPH_BYID;
/* WINE_MOUSE_Y_AXIS_INSTANCE := 1 */
di_op.diph.dwObj = (DIDFT_MAKEINSTANCE(1) | DIDFT_RELAXIS);
di_op.diph.dwSize = sizeof(DIPROPDWORD);
di_op.diph.dwHeaderSize = sizeof(DIPROPHEADER);
hr = IDirectInputDevice_GetProperty(pMouse, DIPROP_GRANULARITY, &di_op.diph);
/* Granularity of Y axis should be 1! */
ok(hr == S_OK && di_op.dwData == 1, "GetProperty(): %08x, dwData: %i but should be 1.\n", hr, di_op.dwData);
}
if (pMouse) IUnknown_Release(pMouse);