mirror of
git://source.winehq.org/git/wine.git
synced 2024-10-31 12:54:13 +00:00
Changed mouse UnAcquire to NOT unacquire it on multiple unacquires.
Implemented DIPROP_AXISMODE for SysMouseAImpl_SetProperty.
This commit is contained in:
parent
4dc7f4ca06
commit
0f5231d980
1 changed files with 25 additions and 14 deletions
|
@ -1125,7 +1125,7 @@ static ULONG WINAPI SysMouseAImpl_Release(LPDIRECTINPUTDEVICE2A iface)
|
|||
if (This->data_queue != NULL)
|
||||
HeapFree(GetProcessHeap(),0,This->data_queue);
|
||||
|
||||
/* Install the previous event handler (in case of releasing an aquired
|
||||
/* Install the previous event handler (in case of releasing an acquired
|
||||
mouse device) */
|
||||
if (This->prev_handler != NULL)
|
||||
MOUSE_Enable(This->prev_handler);
|
||||
|
@ -1456,7 +1456,7 @@ static HRESULT WINAPI SysMouseAImpl_Acquire(LPDIRECTINPUTDEVICE2A iface)
|
|||
|
||||
This->acquired = 1;
|
||||
}
|
||||
return 0;
|
||||
return DI_OK;
|
||||
}
|
||||
|
||||
/******************************************************************************
|
||||
|
@ -1468,6 +1468,8 @@ static HRESULT WINAPI SysMouseAImpl_Unacquire(LPDIRECTINPUTDEVICE2A iface)
|
|||
|
||||
TRACE("(this=%p)\n",This);
|
||||
|
||||
if (This->acquired)
|
||||
{
|
||||
/* Reinstall previous mouse event handler */
|
||||
MOUSE_Enable(This->prev_handler);
|
||||
This->prev_handler = NULL;
|
||||
|
@ -1477,8 +1479,11 @@ static HRESULT WINAPI SysMouseAImpl_Unacquire(LPDIRECTINPUTDEVICE2A iface)
|
|||
|
||||
/* Unacquire device */
|
||||
This->acquired = 0;
|
||||
}
|
||||
else
|
||||
ERR("Unacquiring a not-acquired device !!!\n");
|
||||
|
||||
return 0;
|
||||
return DI_OK;
|
||||
}
|
||||
|
||||
/******************************************************************************
|
||||
|
@ -1610,6 +1615,12 @@ static HRESULT WINAPI SysMouseAImpl_SetProperty(LPDIRECTINPUTDEVICE2A iface,
|
|||
This->queue_len = pd->dwData;
|
||||
break;
|
||||
}
|
||||
case (DWORD) DIPROP_AXISMODE: {
|
||||
LPCDIPROPDWORD pd = (LPCDIPROPDWORD)ph;
|
||||
This->absolute = !(pd->dwData);
|
||||
TRACE("absolute mode: %d\n", This->absolute);
|
||||
break;
|
||||
}
|
||||
default:
|
||||
FIXME("Unknown type %ld (%s)\n",(DWORD)rguid,debugstr_guid(rguid));
|
||||
break;
|
||||
|
@ -1876,7 +1887,7 @@ static HRESULT WINAPI JoystickAImpl_Unacquire(LPDIRECTINPUTDEVICE2A iface)
|
|||
close(This->joyfd);
|
||||
This->joyfd = -1;
|
||||
}
|
||||
return 0;
|
||||
return DI_OK;
|
||||
}
|
||||
|
||||
#define map_axis(val) ((val+32768)*(This->lMax-This->lMin)/65536+This->lMin)
|
||||
|
@ -1944,7 +1955,7 @@ static HRESULT WINAPI JoystickAImpl_GetDeviceState(
|
|||
}
|
||||
|
||||
/******************************************************************************
|
||||
* GetDeviceState : gets buffered input data.
|
||||
* GetDeviceData : gets buffered input data.
|
||||
*/
|
||||
static HRESULT WINAPI JoystickAImpl_GetDeviceData(LPDIRECTINPUTDEVICE2A iface,
|
||||
DWORD dodsize,
|
||||
|
|
Loading…
Reference in a new issue