From d61d710121b1dc36acc68ae46cc5bd47cdc0c826 Mon Sep 17 00:00:00 2001 From: Alistair Leslie-Hughes Date: Sun, 10 Nov 2019 08:58:48 +0000 Subject: [PATCH] dinput: Mouse device doesn't support property DIPROP_VIDPID. Signed-off-by: Alistair Leslie-Hughes Signed-off-by: Alexandre Julliard --- dlls/dinput/mouse.c | 3 ++- dlls/dinput/tests/mouse.c | 8 ++++++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/dlls/dinput/mouse.c b/dlls/dinput/mouse.c index 52a766b2a1a..08ace2f4e97 100644 --- a/dlls/dinput/mouse.c +++ b/dlls/dinput/mouse.c @@ -652,7 +652,8 @@ static HRESULT WINAPI SysMouseWImpl_GetProperty(LPDIRECTINPUTDEVICE8W iface, REF break; } - + case (DWORD_PTR) DIPROP_VIDPID: + return DIERR_UNSUPPORTED; default: return IDirectInputDevice2WImpl_GetProperty(iface, rguid, pdiph); } diff --git a/dlls/dinput/tests/mouse.c b/dlls/dinput/tests/mouse.c index 19d1c3708bf..2e0b8cdf2e9 100644 --- a/dlls/dinput/tests/mouse.c +++ b/dlls/dinput/tests/mouse.c @@ -198,6 +198,14 @@ static void test_acquire(IDirectInputA *pDI, HWND hwnd) /* 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); + memset(&di_op, 0, sizeof(di_op)); + di_op.diph.dwSize = sizeof(DIPROPDWORD); + di_op.diph.dwHeaderSize = sizeof(DIPROPHEADER); + di_op.diph.dwHow = DIPH_DEVICE; + di_op.diph.dwObj = 0; + hr = IDirectInputDevice_GetProperty(pMouse, DIPROP_VIDPID, &di_op.diph); + ok(hr == DIERR_UNSUPPORTED, "got %08x\n", hr); + IUnknown_Release(pMouse); DestroyWindow( hwnd2 );