dinput: Reset the clipped flag when the cursor is released.

This commit is contained in:
Alexandre Julliard 2011-05-05 16:31:51 +02:00
parent 821adcfac3
commit 86b682154b
1 changed files with 6 additions and 0 deletions

View File

@ -491,6 +491,11 @@ static HRESULT WINAPI SysMouseWImpl_Acquire(LPDIRECTINPUTDEVICE8W iface)
if (!This->base.win) This->base.win = GetDesktopWindow(); if (!This->base.win) This->base.win = GetDesktopWindow();
warp_check( This, TRUE ); warp_check( This, TRUE );
} }
else if (This->clipped)
{
ClipCursor( NULL );
This->clipped = FALSE;
}
return DI_OK; return DI_OK;
} }
@ -517,6 +522,7 @@ static HRESULT WINAPI SysMouseWImpl_Unacquire(LPDIRECTINPUTDEVICE8W iface)
{ {
ClipCursor(NULL); ClipCursor(NULL);
ShowCursor(TRUE); /* show cursor */ ShowCursor(TRUE); /* show cursor */
This->clipped = FALSE;
} }
/* And put the mouse cursor back where it was at acquire time */ /* And put the mouse cursor back where it was at acquire time */