mirror of
https://github.com/reactos/wine.git
synced 2024-11-25 20:59:54 +00:00
dinput: Keyboard does not support DIPROP_RANGE property.
This commit is contained in:
parent
e47ef8ae54
commit
eb6cec1656
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user