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

This commit is contained in:
Vitaliy Margolen 2006-12-17 23:22:11 -07:00 committed by Alexandre Julliard
parent 350c66fec2
commit 7b07e4b563
1 changed files with 19 additions and 0 deletions

View File

@ -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;