From 6d5be5033e96a493ac92067214cbde45d937ea8b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ri=C4=8Dardas=20Barkauskas?= Date: Tue, 31 May 2011 14:57:04 +0300 Subject: [PATCH] ddraw: Change IDirectDrawSurface3_vtbl to IDirectDrawSurface3_iface. --- dlls/ddraw/ddraw.c | 22 +++++++++++----------- dlls/ddraw/ddraw_private.h | 4 ++-- dlls/ddraw/device.c | 2 +- dlls/ddraw/surface.c | 10 +++++----- 4 files changed, 19 insertions(+), 19 deletions(-) diff --git a/dlls/ddraw/ddraw.c b/dlls/ddraw/ddraw.c index d4fbf3b0cf3..3365c35f1a4 100644 --- a/dlls/ddraw/ddraw.c +++ b/dlls/ddraw/ddraw.c @@ -2023,7 +2023,7 @@ static HRESULT WINAPI ddraw3_GetGDISurface(IDirectDraw3 *iface, IDirectDrawSurfa TRACE("iface %p, surface %p.\n", iface, surface); hr = ddraw7_GetGDISurface(&This->IDirectDraw7_iface, &surface7); - *surface = surface7 ? (IDirectDrawSurface *)&((IDirectDrawSurfaceImpl *)surface7)->IDirectDrawSurface3_vtbl : NULL; + *surface = surface7 ? (IDirectDrawSurface *)&((IDirectDrawSurfaceImpl *)surface7)->IDirectDrawSurface3_iface : NULL; return hr; } @@ -2037,7 +2037,7 @@ static HRESULT WINAPI ddraw2_GetGDISurface(IDirectDraw2 *iface, IDirectDrawSurfa TRACE("iface %p, surface %p.\n", iface, surface); hr = ddraw7_GetGDISurface(&This->IDirectDraw7_iface, &surface7); - *surface = surface7 ? (IDirectDrawSurface *)&((IDirectDrawSurfaceImpl *)surface7)->IDirectDrawSurface3_vtbl : NULL; + *surface = surface7 ? (IDirectDrawSurface *)&((IDirectDrawSurfaceImpl *)surface7)->IDirectDrawSurface3_iface : NULL; return hr; } @@ -2051,7 +2051,7 @@ static HRESULT WINAPI ddraw1_GetGDISurface(IDirectDraw *iface, IDirectDrawSurfac TRACE("iface %p, surface %p.\n", iface, surface); hr = ddraw7_GetGDISurface(&This->IDirectDraw7_iface, &surface7); - *surface = surface7 ? (IDirectDrawSurface *)&((IDirectDrawSurfaceImpl *)surface7)->IDirectDrawSurface3_vtbl : NULL; + *surface = surface7 ? (IDirectDrawSurface *)&((IDirectDrawSurfaceImpl *)surface7)->IDirectDrawSurface3_iface : NULL; return hr; } @@ -2416,7 +2416,7 @@ static HRESULT WINAPI ddraw4_GetSurfaceFromDC(IDirectDraw4 *iface, HDC dc, if (!surface) return E_INVALIDARG; hr = ddraw7_GetSurfaceFromDC(&This->IDirectDraw7_iface, dc, &surface7); - *surface = surface7 ? (IDirectDrawSurface4 *)&((IDirectDrawSurfaceImpl *)surface7)->IDirectDrawSurface3_vtbl : NULL; + *surface = surface7 ? (IDirectDrawSurface4 *)&((IDirectDrawSurfaceImpl *)surface7)->IDirectDrawSurface3_iface : NULL; return hr; } @@ -3508,7 +3508,7 @@ static HRESULT WINAPI ddraw3_CreateSurface(IDirectDraw3 *iface, DDSURFACEDESC *s } impl = (IDirectDrawSurfaceImpl *)surface7; - *surface = (IDirectDrawSurface *)&impl->IDirectDrawSurface3_vtbl; + *surface = (IDirectDrawSurface *)&impl->IDirectDrawSurface3_iface; ddraw_set_surface_version(impl, 3); IDirectDraw7_Release(&This->IDirectDraw7_iface); IDirectDraw3_AddRef(iface); @@ -3554,7 +3554,7 @@ static HRESULT WINAPI ddraw2_CreateSurface(IDirectDraw2 *iface, } impl = (IDirectDrawSurfaceImpl *)surface7; - *surface = (IDirectDrawSurface *)&impl->IDirectDrawSurface3_vtbl; + *surface = (IDirectDrawSurface *)&impl->IDirectDrawSurface3_iface; ddraw_set_surface_version(impl, 2); IDirectDraw7_Release(&This->IDirectDraw7_iface); impl->ifaceToRelease = NULL; @@ -3590,7 +3590,7 @@ static HRESULT WINAPI ddraw1_CreateSurface(IDirectDraw *iface, } impl = (IDirectDrawSurfaceImpl *)surface7; - *surface = (IDirectDrawSurface *)&impl->IDirectDrawSurface3_vtbl; + *surface = (IDirectDrawSurface *)&impl->IDirectDrawSurface3_iface; ddraw_set_surface_version(impl, 1); IDirectDraw7_Release(&This->IDirectDraw7_iface); impl->ifaceToRelease = NULL; @@ -3721,7 +3721,7 @@ static HRESULT CALLBACK EnumSurfacesCallbackThunk(IDirectDrawSurface7 *surface, { struct surfacescallback_context *cbcontext = context; - return cbcontext->func((IDirectDrawSurface *)&((IDirectDrawSurfaceImpl *)surface)->IDirectDrawSurface3_vtbl, + return cbcontext->func((IDirectDrawSurface *)&((IDirectDrawSurfaceImpl *)surface)->IDirectDrawSurface3_iface, (DDSURFACEDESC *)surface_desc, cbcontext->context); } @@ -4168,7 +4168,7 @@ static HRESULT WINAPI ddraw3_DuplicateSurface(IDirectDraw3 *iface, IDirectDrawSu hr = ddraw7_DuplicateSurface(&This->IDirectDraw7_iface, (IDirectDrawSurface7 *)src_impl, &dst7); if (FAILED(hr)) return hr; - *dst = (IDirectDrawSurface *)&((IDirectDrawSurfaceImpl *)dst7)->IDirectDrawSurface3_vtbl; + *dst = (IDirectDrawSurface *)&((IDirectDrawSurfaceImpl *)dst7)->IDirectDrawSurface3_iface; return hr; } @@ -4184,7 +4184,7 @@ static HRESULT WINAPI ddraw2_DuplicateSurface(IDirectDraw2 *iface, hr = ddraw7_DuplicateSurface(&This->IDirectDraw7_iface, (IDirectDrawSurface7 *)src_impl, &dst7); if (FAILED(hr)) return hr; - *dst = (IDirectDrawSurface *)&((IDirectDrawSurfaceImpl *)dst7)->IDirectDrawSurface3_vtbl; + *dst = (IDirectDrawSurface *)&((IDirectDrawSurfaceImpl *)dst7)->IDirectDrawSurface3_iface; return hr; } @@ -4200,7 +4200,7 @@ static HRESULT WINAPI ddraw1_DuplicateSurface(IDirectDraw *iface, IDirectDrawSur hr = ddraw7_DuplicateSurface(&This->IDirectDraw7_iface, (IDirectDrawSurface7 *)src_impl, &dst7); if (FAILED(hr)) return hr; - *dst = (IDirectDrawSurface *)&((IDirectDrawSurfaceImpl *)dst7)->IDirectDrawSurface3_vtbl; + *dst = (IDirectDrawSurface *)&((IDirectDrawSurfaceImpl *)dst7)->IDirectDrawSurface3_iface; return hr; } diff --git a/dlls/ddraw/ddraw_private.h b/dlls/ddraw/ddraw_private.h index e768659e2cf..c9c1b46c18f 100644 --- a/dlls/ddraw/ddraw_private.h +++ b/dlls/ddraw/ddraw_private.h @@ -153,7 +153,7 @@ struct IDirectDrawSurfaceImpl { /* IUnknown fields */ const IDirectDrawSurface7Vtbl *lpVtbl; - const IDirectDrawSurface3Vtbl *IDirectDrawSurface3_vtbl; + IDirectDrawSurface3 IDirectDrawSurface3_iface; const IDirectDrawGammaControlVtbl *IDirectDrawGammaControl_vtbl; const IDirect3DTexture2Vtbl *IDirect3DTexture2_vtbl; const IDirect3DTextureVtbl *IDirect3DTexture_vtbl; @@ -222,7 +222,7 @@ static inline IDirectDrawSurfaceImpl *surface_from_texture2(IDirect3DTexture2 *i static inline IDirectDrawSurfaceImpl *impl_from_IDirectDrawSurface3(IDirectDrawSurface3 *iface) { - return CONTAINING_RECORD(iface, IDirectDrawSurfaceImpl, IDirectDrawSurface3_vtbl); + return CONTAINING_RECORD(iface, IDirectDrawSurfaceImpl, IDirectDrawSurface3_iface); } IDirectDrawSurfaceImpl *unsafe_impl_from_IDirectDrawSurface3(IDirectDrawSurface3 *iface) DECLSPEC_HIDDEN; diff --git a/dlls/ddraw/device.c b/dlls/ddraw/device.c index 728d9b1f19c..3bbc6823152 100644 --- a/dlls/ddraw/device.c +++ b/dlls/ddraw/device.c @@ -1967,7 +1967,7 @@ static HRESULT WINAPI IDirect3DDeviceImpl_2_GetRenderTarget(IDirect3DDevice2 *if hr = IDirect3DDevice7_GetRenderTarget((IDirect3DDevice7 *)This, (IDirectDrawSurface7 **)RenderTarget); if(hr != D3D_OK) return hr; *RenderTarget = *RenderTarget ? - (IDirectDrawSurface *)&((IDirectDrawSurfaceImpl *)*RenderTarget)->IDirectDrawSurface3_vtbl : NULL; + (IDirectDrawSurface *)&((IDirectDrawSurfaceImpl *)*RenderTarget)->IDirectDrawSurface3_iface : NULL; return D3D_OK; } diff --git a/dlls/ddraw/surface.c b/dlls/ddraw/surface.c index 1fb96304fb2..d63b530990f 100644 --- a/dlls/ddraw/surface.c +++ b/dlls/ddraw/surface.c @@ -84,7 +84,7 @@ static HRESULT WINAPI ddraw_surface7_QueryInterface(IDirectDrawSurface7 *iface, || IsEqualGUID(riid, &IID_IDirectDrawSurface) ) { IUnknown_AddRef(iface); - *obj = &This->IDirectDrawSurface3_vtbl; + *obj = &This->IDirectDrawSurface3_iface; TRACE("(%p) returning IDirectDrawSurface3 interface at %p\n", This, *obj); return S_OK; } @@ -567,7 +567,7 @@ static HRESULT WINAPI ddraw_surface3_GetAttachedSurface(IDirectDrawSurface3 *ifa &caps2, &attachment7); if (FAILED(hr)) *attachment = NULL; else *attachment = attachment7 ? - (IDirectDrawSurface3 *)&((IDirectDrawSurfaceImpl *)attachment7)->IDirectDrawSurface3_vtbl : NULL; + &((IDirectDrawSurfaceImpl *)attachment7)->IDirectDrawSurface3_iface : NULL; return hr; } @@ -1561,7 +1561,7 @@ static HRESULT CALLBACK EnumCallback(IDirectDrawSurface7 *surface, DDSURFACEDESC { const struct callback_info *info = context; - return info->callback((IDirectDrawSurface *)&((IDirectDrawSurfaceImpl *)surface)->IDirectDrawSurface3_vtbl, + return info->callback((IDirectDrawSurface *)&((IDirectDrawSurfaceImpl *)surface)->IDirectDrawSurface3_iface, (DDSURFACEDESC *)surface_desc, info->context); } @@ -3447,7 +3447,7 @@ IDirectDrawSurfaceImpl *unsafe_impl_from_IDirectDrawSurface3(IDirectDrawSurface3 { if (!iface) return NULL; assert(iface->lpVtbl == &ddraw_surface3_vtbl); - return CONTAINING_RECORD(iface, IDirectDrawSurfaceImpl, IDirectDrawSurface3_vtbl); + return CONTAINING_RECORD(iface, IDirectDrawSurfaceImpl, IDirectDrawSurface3_iface); } static void STDMETHODCALLTYPE ddraw_surface_wined3d_object_destroyed(void *parent) @@ -3608,7 +3608,7 @@ HRESULT ddraw_surface_init(IDirectDrawSurfaceImpl *surface, IDirectDrawImpl *ddr } surface->lpVtbl = &ddraw_surface7_vtbl; - surface->IDirectDrawSurface3_vtbl = &ddraw_surface3_vtbl; + surface->IDirectDrawSurface3_iface.lpVtbl = &ddraw_surface3_vtbl; surface->IDirectDrawGammaControl_vtbl = &ddraw_gamma_control_vtbl; surface->IDirect3DTexture2_vtbl = &d3d_texture2_vtbl; surface->IDirect3DTexture_vtbl = &d3d_texture1_vtbl;