Commit 5f6dd538 authored by Henri Verbeet's avatar Henri Verbeet Committed by Alexandre Julliard

wined3d: Move the cursor in wined3d_device_set_cursor_position().

parent bbbee31c
...@@ -5251,10 +5251,16 @@ void CDECL wined3d_device_set_cursor_position(struct wined3d_device *device, ...@@ -5251,10 +5251,16 @@ void CDECL wined3d_device_set_cursor_position(struct wined3d_device *device,
device->xScreenSpace = x_screen_space; device->xScreenSpace = x_screen_space;
device->yScreenSpace = y_screen_space; device->yScreenSpace = y_screen_space;
/* switch to the software cursor if position diverges from the hardware one */
if (device->hardwareCursor) if (device->hardwareCursor)
{ {
POINT pt; 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 ); GetCursorPos( &pt );
if (x_screen_space != pt.x || y_screen_space != pt.y) if (x_screen_space != pt.x || y_screen_space != pt.y)
{ {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment