Commit 7b07e4b5 authored by Vitaliy Margolen's avatar Vitaliy Margolen Committed by Alexandre Julliard

dinput: Add handling of AXISMODE property to base device object.

parent 350c66fe
......@@ -876,6 +876,25 @@ HRESULT WINAPI IDirectInputDevice2AImpl_SetProperty(
switch (LOWORD(rguid))
{
case (DWORD) DIPROP_AXISMODE:
{
LPCDIPROPDWORD pd = (LPCDIPROPDWORD)pdiph;
if (pdiph->dwSize != sizeof(DIPROPDWORD)) return DIERR_INVALIDPARAM;
if (pdiph->dwHow == DIPH_DEVICE && pdiph->dwObj) return DIERR_INVALIDPARAM;
if (This->acquired) return DIERR_ACQUIRED;
if (pdiph->dwHow != DIPH_DEVICE) return DIERR_UNSUPPORTED;
TRACE("Axis mode: %s\n", pd->dwData == DIPROPAXISMODE_ABS ? "absolute" :
"relative");
EnterCriticalSection(&This->crit);
This->data_format.user_df->dwFlags &= ~DIDFT_AXIS;
This->data_format.user_df->dwFlags |= pd->dwData == DIPROPAXISMODE_ABS ?
DIDF_ABSAXIS : DIDF_RELAXIS;
LeaveCriticalSection(&This->crit);
break;
}
case (DWORD) DIPROP_BUFFERSIZE:
{
LPCDIPROPDWORD pd = (LPCDIPROPDWORD)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