Henri Verbeet : wined3d: Store an IWineD3DClipperImpl pointer in IWineD3DSurfaceImpl.
Alexandre Julliard
julliard at winehq.org
Tue Jan 18 10:27:33 CST 2011
Module: wine
Branch: master
Commit: d91a413ade2fd1de9bb2a44ecff13edf76c4ca98
URL: http://source.winehq.org/git/wine.git/?a=commit;h=d91a413ade2fd1de9bb2a44ecff13edf76c4ca98
Author: Henri Verbeet <hverbeet at codeweavers.com>
Date: Mon Jan 17 18:49:31 2011 +0100
wined3d: Store an IWineD3DClipperImpl pointer in IWineD3DSurfaceImpl.
---
dlls/wined3d/surface.c | 6 +++---
dlls/wined3d/surface_base.c | 8 ++++----
dlls/wined3d/wined3d_private.h | 2 +-
3 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
index 8eedb90..7e19a02 100644
--- a/dlls/wined3d/surface.c
+++ b/dlls/wined3d/surface.c
@@ -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)
diff --git a/dlls/wined3d/surface_base.c b/dlls/wined3d/surface_base.c
index ae0643e..4449bf0 100644
--- a/dlls/wined3d/surface_base.c
+++ b/dlls/wined3d/surface_base.c
@@ -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;
}
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
index 65db699..b1202f3 100644
--- a/dlls/wined3d/wined3d_private.h
+++ b/dlls/wined3d/wined3d_private.h
@@ -2140,7 +2140,7 @@ struct IWineD3DSurfaceImpl
SIZE ds_current_size;
/* DirectDraw clippers */
- IWineD3DClipper *clipper;
+ struct IWineD3DClipperImpl *clipper;
/* DirectDraw Overlay handling */
RECT overlay_srcrect;
More information about the wine-cvs
mailing list