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

dinput: Implement saturation property for evdev joystick driver.

parent 87c3df15
......@@ -885,6 +885,26 @@ static HRESULT WINAPI JoystickAImpl_SetProperty(LPDIRECTINPUTDEVICE8A iface,
FIXME("DIPROP_AUTOCENTER(%d)\n", pd->dwData);
break;
}
case (DWORD)DIPROP_SATURATION: {
LPCDIPROPDWORD pd = (LPCDIPROPDWORD)ph;
if (ph->dwHow == DIPH_DEVICE) {
int i;
TRACE("saturation(%d) all\n", pd->dwData);
for (i = 0; i < This->base.data_format.wine_df->dwNumObjs; i++)
This->props[i].lSaturation = pd->dwData;
} else {
int obj = find_property(&This->base.data_format, ph);
if (obj < 0) return DIERR_OBJECTNOTFOUND;
TRACE("saturation(%d) obj=%d\n", pd->dwData, obj);
This->props[obj].lSaturation = pd->dwData;
}
fake_current_js_state(This);
break;
}
default:
return IDirectInputDevice2AImpl_SetProperty(iface, rguid, ph);
}
......@@ -977,6 +997,17 @@ static HRESULT WINAPI JoystickAImpl_GetProperty(LPDIRECTINPUTDEVICE8A iface,
TRACE("deadzone(%d) obj=%d\n", pd->dwData, obj);
break;
}
case (DWORD) DIPROP_SATURATION:
{
LPDIPROPDWORD pd = (LPDIPROPDWORD)pdiph;
int obj = find_property(&This->base.data_format, pdiph);
if (obj < 0) return DIERR_OBJECTNOTFOUND;
pd->dwData = This->props[obj].lSaturation;
TRACE("saturation(%d) obj=%d\n", pd->dwData, obj);
break;
}
default:
return IDirectInputDevice2AImpl_GetProperty(iface, rguid, pdiph);
......
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