[PATCH 1/5] wined3d: Move the cursor in wined3d_device_set_cursor_position().

Stefan Dösinger stefandoesinger at gmx.at
Fri Oct 21 10:12:38 CDT 2011


Hi,

Does this address Alexandre's need for a software cursor, or is this 
unrelated?

In the tests I recommend to test a bigger cursor in addition to the 32x32 
cursor to see what happens in situations where Windows falls back to a 
software cursor.

Stefan

On Thursday 20 October 2011 12:42:55 Henri Verbeet wrote:
> ---
>  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)
>          {
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
URL: <http://www.winehq.org/pipermail/wine-devel/attachments/20111021/68737003/attachment-0001.pgp>


More information about the wine-devel mailing list