Commit d91a413a authored by Henri Verbeet's avatar Henri Verbeet Committed by Alexandre Julliard

wined3d: Store an IWineD3DClipperImpl pointer in IWineD3DSurfaceImpl.

parent 098cdf4a
......@@ -3507,16 +3507,16 @@ static HRESULT IWineD3DSurfaceImpl_BltOverride(IWineD3DSurfaceImpl *dst_surface,
}
/* Destination must be full surface or match the clipping rectangle */
if (dst_surface->clipper && ((IWineD3DClipperImpl *)dst_surface->clipper)->hWnd)
if (dst_surface->clipper && dst_surface->clipper->hWnd)
{
RECT cliprect;
POINT pos[2];
GetClientRect(((IWineD3DClipperImpl *)dst_surface->clipper)->hWnd, &cliprect);
GetClientRect(dst_surface->clipper->hWnd, &cliprect);
pos[0].x = dst_rect.left;
pos[0].y = dst_rect.top;
pos[1].x = dst_rect.right;
pos[1].y = dst_rect.bottom;
MapWindowPoints(GetDesktopWindow(), ((IWineD3DClipperImpl *)dst_surface->clipper)->hWnd, pos, 2);
MapWindowPoints(GetDesktopWindow(), dst_surface->clipper->hWnd, pos, 2);
if(pos[0].x != cliprect.left || pos[0].y != cliprect.top ||
pos[1].x != cliprect.right || pos[1].y != cliprect.bottom)
......
......@@ -471,7 +471,7 @@ HRESULT WINAPI IWineD3DBaseSurfaceImpl_SetClipper(IWineD3DSurface *iface, IWineD
IWineD3DSurfaceImpl *This = (IWineD3DSurfaceImpl *) iface;
TRACE("(%p)->(%p)\n", This, clipper);
This->clipper = clipper;
This->clipper = (IWineD3DClipperImpl *)clipper;
return WINED3D_OK;
}
......@@ -480,10 +480,10 @@ HRESULT WINAPI IWineD3DBaseSurfaceImpl_GetClipper(IWineD3DSurface *iface, IWineD
IWineD3DSurfaceImpl *This = (IWineD3DSurfaceImpl *) iface;
TRACE("(%p)->(%p)\n", This, clipper);
*clipper = This->clipper;
if(*clipper) {
*clipper = (IWineD3DClipper *)This->clipper;
if (*clipper)
IWineD3DClipper_AddRef(*clipper);
}
return WINED3D_OK;
}
......
......@@ -2140,7 +2140,7 @@ struct IWineD3DSurfaceImpl
SIZE ds_current_size;
/* DirectDraw clippers */
IWineD3DClipper *clipper;
struct IWineD3DClipperImpl *clipper;
/* DirectDraw Overlay handling */
RECT overlay_srcrect;
......
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