Commit eb6cec16 authored by Vitaliy Margolen's avatar Vitaliy Margolen Committed by Alexandre Julliard

dinput: Keyboard does not support DIPROP_RANGE property.

parent e47ef8ae
......@@ -509,6 +509,8 @@ static HRESULT WINAPI SysKeyboardWImpl_GetProperty(LPDIRECTINPUTDEVICE8W iface,
memcpy(ps->wsz, didoi.tszName, sizeof(ps->wsz));
return hr;
}
case (DWORD_PTR) DIPROP_RANGE:
return DIERR_UNSUPPORTED;
default:
return IDirectInputDevice2AImpl_GetProperty( IDirectInputDevice8A_from_impl(This), rguid, pdiph );
}
......
......@@ -130,6 +130,28 @@ static void test_set_coop(LPDIRECTINPUT pDI, HWND hwnd)
if (pKeyboard) IUnknown_Release(pKeyboard);
}
static void test_get_prop(LPDIRECTINPUT pDI, HWND hwnd)
{
HRESULT hr;
LPDIRECTINPUTDEVICE pKeyboard = NULL;
DIPROPRANGE diprg;
hr = IDirectInput_CreateDevice(pDI, &GUID_SysKeyboard, &pKeyboard, NULL);
ok(SUCCEEDED(hr), "IDirectInput_CreateDevice() failed: %08x\n", hr);
if (FAILED(hr)) return;
memset(&diprg, 0, sizeof(diprg));
diprg.diph.dwSize = sizeof(DIPROPRANGE);
diprg.diph.dwHeaderSize = sizeof(DIPROPHEADER);
diprg.diph.dwHow = DIPH_DEVICE;
diprg.diph.dwObj = 0;
hr = IDirectInputDevice_GetProperty(pKeyboard, DIPROP_RANGE, &diprg.diph);
ok(hr == DIERR_UNSUPPORTED, "IDirectInputDevice_GetProperty() did not return DIPROP_RANGE but: %08x\n", hr);
if (pKeyboard) IUnknown_Release(pKeyboard);
}
static void keyboard_tests(DWORD version)
{
HRESULT hr;
......@@ -155,6 +177,7 @@ static void keyboard_tests(DWORD version)
{
acquire_tests(pDI, hwnd);
test_set_coop(pDI, hwnd);
test_get_prop(pDI, hwnd);
}
DestroyWindow(hwnd);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment