dinput: Return user set limits not the device limits.
This commit is contained in:
parent
15e0ccab9b
commit
575ede974d
|
@ -903,31 +903,28 @@ static HRESULT WINAPI JoystickAImpl_GetProperty(LPDIRECTINPUTDEVICE8A iface,
|
||||||
{
|
{
|
||||||
JoystickImpl *This = (JoystickImpl *)iface;
|
JoystickImpl *This = (JoystickImpl *)iface;
|
||||||
|
|
||||||
TRACE("(this=%p,%s,%p)\n",
|
TRACE("(this=%p,%s,%p)\n", iface, debugstr_guid(rguid), pdiph);
|
||||||
iface, debugstr_guid(rguid), pdiph);
|
|
||||||
|
|
||||||
if (TRACE_ON(dinput))
|
|
||||||
_dump_DIPROPHEADER(pdiph);
|
_dump_DIPROPHEADER(pdiph);
|
||||||
|
|
||||||
if (!HIWORD(rguid)) {
|
if (HIWORD(rguid)) return DI_OK;
|
||||||
|
|
||||||
switch (LOWORD(rguid)) {
|
switch (LOWORD(rguid)) {
|
||||||
case (DWORD) DIPROP_RANGE: {
|
case (DWORD) DIPROP_RANGE:
|
||||||
|
{
|
||||||
LPDIPROPRANGE pr = (LPDIPROPRANGE) pdiph;
|
LPDIPROPRANGE pr = (LPDIPROPRANGE) pdiph;
|
||||||
int obj = find_property(&This->base.data_format, pdiph);
|
int obj = find_property(&This->base.data_format, pdiph);
|
||||||
|
|
||||||
if (obj >= 0) {
|
if (obj < 0) return DIERR_OBJECTNOTFOUND;
|
||||||
pr->lMin = This->props[obj].havemin;
|
|
||||||
pr->lMax = This->props[obj].havemax;
|
pr->lMin = This->props[obj].wantmin;
|
||||||
|
pr->lMax = This->props[obj].wantmax;
|
||||||
TRACE("range(%d, %d) obj=%d\n", pr->lMin, pr->lMax, obj);
|
TRACE("range(%d, %d) obj=%d\n", pr->lMin, pr->lMax, obj);
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
default:
|
default:
|
||||||
return IDirectInputDevice2AImpl_GetProperty(iface, rguid, pdiph);
|
return IDirectInputDevice2AImpl_GetProperty(iface, rguid, pdiph);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
return DI_OK;
|
return DI_OK;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue