[PATCH 4/7] wined3d: make wined3d_device_set_cursor_properties work with wined3d_texture and sub_resource_index

Henri Verbeet hverbeet at gmail.com
Tue Oct 13 10:04:42 CDT 2015


On 12 October 2015 at 17:23, Riccardo Bortolato <rikyz619 at gmail.com> wrote:
>  HRESULT CDECL wined3d_device_set_cursor_properties(struct wined3d_device *device,
> -        UINT x_hotspot, UINT y_hotspot, struct wined3d_surface *cursor_image)
> +        UINT x_hotspot, UINT y_hotspot, struct wined3d_texture *wined3d_texture, unsigned int sub_resource_idx)
"wined3d_texture" is redundant inside wined3d, just "texture" is fine.

>  {
> +    struct wined3d_resource *sub_resource = wined3d_texture_get_sub_resource(wined3d_texture, sub_resource_idx);
> +    struct wined3d_surface *cursor_image;
> +
> +    if (!sub_resource)
> +        return WINED3DERR_INVALIDCALL;
> +
> +    cursor_image = surface_from_resource(sub_resource);
> +
>      TRACE("device %p, x_hotspot %u, y_hotspot %u, cursor_image %p.\n",
>              device, x_hotspot, y_hotspot, cursor_image);
Like in 3/7, please move most of the new lines after the TRACE, and
then update the trace to match the parameters.



More information about the wine-devel mailing list