Commit 9a99dc14 authored by Christian Costa's avatar Christian Costa Committed by Alexandre Julliard

Implemented GetProperty method for keyboard device.

parent db6db7cb
......@@ -978,7 +978,7 @@ static HRESULT WINAPI JoystickAImpl_GetProperty(LPDIRECTINPUTDEVICE8A iface,
{
JoystickImpl *This = (JoystickImpl *)iface;
TRACE("(this=%p,%s,%p): stub!\n",
TRACE("(this=%p,%s,%p)\n",
iface, debugstr_guid(rguid), pdiph);
if (TRACE_ON(dinput))
......
......@@ -356,6 +356,37 @@ static HRESULT WINAPI SysKeyboardAImpl_SetProperty(
return DI_OK;
}
static HRESULT WINAPI SysKeyboardAImpl_GetProperty(
LPDIRECTINPUTDEVICE8A iface,REFGUID rguid,LPDIPROPHEADER ph
)
{
SysKeyboardImpl *This = (SysKeyboardImpl *)iface;
TRACE("(this=%p,%s,%p)\n",This,debugstr_guid(rguid),ph);
TRACE("(size=%ld,headersize=%ld,obj=%ld,how=%ld\n",
ph->dwSize,ph->dwHeaderSize,ph->dwObj,ph->dwHow);
if (!HIWORD(rguid)) {
switch ((DWORD)rguid) {
case (DWORD) DIPROP_BUFFERSIZE: {
LPDIPROPDWORD pd = (LPDIPROPDWORD)ph;
TRACE("(buffersize=%ld)\n",pd->dwData);
if (This->acquired)
return DIERR_INVALIDPARAM;
pd->dwData = This->buffersize;
break;
}
default:
WARN("Unknown type %ld\n",(DWORD)rguid);
break;
}
}
return DI_OK;
}
static HRESULT WINAPI SysKeyboardAImpl_GetDeviceState(
LPDIRECTINPUTDEVICE8A iface,DWORD len,LPVOID ptr
)
......@@ -712,7 +743,7 @@ static IDirectInputDevice8AVtbl SysKeyboardAvt =
SysKeyboardAImpl_Release,
SysKeyboardAImpl_GetCapabilities,
SysKeyboardAImpl_EnumObjects,
IDirectInputDevice2AImpl_GetProperty,
SysKeyboardAImpl_GetProperty,
SysKeyboardAImpl_SetProperty,
SysKeyboardAImpl_Acquire,
SysKeyboardAImpl_Unacquire,
......@@ -754,7 +785,7 @@ static IDirectInputDevice8WVtbl SysKeyboardWvt =
XCAST(Release)SysKeyboardAImpl_Release,
XCAST(GetCapabilities)SysKeyboardAImpl_GetCapabilities,
SysKeyboardWImpl_EnumObjects,
XCAST(GetProperty)IDirectInputDevice2AImpl_GetProperty,
XCAST(GetProperty)SysKeyboardAImpl_GetProperty,
XCAST(SetProperty)SysKeyboardAImpl_SetProperty,
XCAST(Acquire)SysKeyboardAImpl_Acquire,
XCAST(Unacquire)SysKeyboardAImpl_Unacquire,
......
......@@ -845,7 +845,7 @@ static HRESULT WINAPI SysMouseAImpl_GetProperty(LPDIRECTINPUTDEVICE8A iface,
{
SysMouseImpl *This = (SysMouseImpl *)iface;
TRACE("(this=%p,%s,%p): stub!\n",
TRACE("(this=%p,%s,%p)\n",
iface, debugstr_guid(rguid), pdiph);
if (TRACE_ON(dinput))
......
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