[prev in list] [next in list] [prev in thread] [next in thread]
List: wine-cvs
Subject: Alexandre Julliard : dinput: Catch unsuccessful clipping attempts and fall back to warping.
From: Alexandre Julliard <julliard () winehq ! org>
Date: 2012-01-30 20:05:58
Message-ID: E1RrxUE-0000ia-75 () wine ! codeweavers ! com
[Download RAW message or body]
Module: wine
Branch: master
Commit: b0657c8623e7ed8745ffb87b3ed47afb55589bc3
URL: http://source.winehq.org/git/wine.git/?a=commit;h=b0657c8623e7ed8745ffb87b3ed47afb55589bc3
Author: Alexandre Julliard <julliard@winehq.org>
Date: Mon Jan 30 17:46:23 2012 +0100
dinput: Catch unsuccessful clipping attempts and fall back to warping.
---
dlls/dinput/mouse.c | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/dlls/dinput/mouse.c b/dlls/dinput/mouse.c
index 20de328..ead6c25 100644
--- a/dlls/dinput/mouse.c
+++ b/dlls/dinput/mouse.c
@@ -421,7 +421,7 @@ static void warp_check( SysMouseImpl* This, BOOL force )
if (force || (This->need_warp && (now - This->last_warped > interval)))
{
- RECT rect;
+ RECT rect, new_rect;
POINT mapped_center;
This->last_warped = now;
@@ -442,7 +442,8 @@ static void warp_check( SysMouseImpl* This, BOOL force )
rect.right = min( rect.right, rect.left + GetSystemMetrics( SM_CXVIRTUALSCREEN ) - 2 );
rect.bottom = min( rect.bottom, rect.top + GetSystemMetrics( SM_CYVIRTUALSCREEN ) - 2 );
TRACE("Clipping mouse to %s\n", wine_dbgstr_rect( &rect ));
- This->clipped = ClipCursor( &rect );
+ ClipCursor( &rect );
+ This->clipped = GetClipCursor( &new_rect ) && EqualRect( &rect, &new_rect );
}
}
}
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic