[PATCH 1/5] wined3d: Move the cursor in wined3d_device_set_cursor_position().
Henri Verbeet
hverbeet at codeweavers.com
Thu Oct 20 14:42:55 CDT 2011
---
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)
{
--
1.7.3.4
More information about the wine-patches
mailing list