Henri Verbeet : wined3d: Move the cursor in wined3d_device_set_cursor_position().

Alexandre Julliard julliard at winehq.org
Fri Oct 21 11:01:58 CDT 2011


Module: wine
Branch: master
Commit: 5f6dd5384c3b48f83d00b24ff0170e710136856c
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=5f6dd5384c3b48f83d00b24ff0170e710136856c

Author: Henri Verbeet <hverbeet at codeweavers.com>
Date:   Thu Oct 20 21:42:55 2011 +0200

wined3d: Move the cursor in wined3d_device_set_cursor_position().

---

 dlls/wined3d/device.c |    8 +++++++-
 1 files changed, 7 insertions(+), 1 deletions(-)

diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
index 67e50b5..6f43715 100644
--- a/dlls/wined3d/device.c
+++ b/dlls/wined3d/device.c
@@ -5251,10 +5251,16 @@ void CDECL wined3d_device_set_cursor_position(struct wined3d_device *device,
     device->xScreenSpace = x_screen_space;
     device->yScreenSpace = y_screen_space;
 
-    /* switch to the software cursor if position diverges from the hardware one */
     if (device->hardwareCursor)
     {
         POINT pt;
+
+        GetCursorPos( &pt );
+        if (x_screen_space == pt.x && y_screen_space == pt.y)
+            return;
+        SetCursorPos( x_screen_space, y_screen_space );
+
+        /* Switch to the software cursor if position diverges from the hardware one. */
         GetCursorPos( &pt );
         if (x_screen_space != pt.x || y_screen_space != pt.y)
         {




More information about the wine-cvs mailing list