From 86b682154b440ee5d2d9bf102704644a11cf01cc Mon Sep 17 00:00:00 2001 From: Alexandre Julliard Date: Thu, 5 May 2011 16:31:51 +0200 Subject: [PATCH] dinput: Reset the clipped flag when the cursor is released. --- dlls/dinput/mouse.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/dlls/dinput/mouse.c b/dlls/dinput/mouse.c index b890c730402..02813ff1863 100644 --- a/dlls/dinput/mouse.c +++ b/dlls/dinput/mouse.c @@ -491,6 +491,11 @@ static HRESULT WINAPI SysMouseWImpl_Acquire(LPDIRECTINPUTDEVICE8W iface) if (!This->base.win) This->base.win = GetDesktopWindow(); warp_check( This, TRUE ); } + else if (This->clipped) + { + ClipCursor( NULL ); + This->clipped = FALSE; + } return DI_OK; } @@ -517,6 +522,7 @@ static HRESULT WINAPI SysMouseWImpl_Unacquire(LPDIRECTINPUTDEVICE8W iface) { ClipCursor(NULL); ShowCursor(TRUE); /* show cursor */ + This->clipped = FALSE; } /* And put the mouse cursor back where it was at acquire time */