Commit bb063b99 authored by Ričardas Barkauskas's avatar Ričardas Barkauskas Committed by Alexandre Julliard

ddraw: Separate IDirectDrawSurface4 vtable.

parent 4582562f
......@@ -2050,7 +2050,7 @@ static HRESULT WINAPI ddraw4_GetGDISurface(IDirectDraw4 *iface, IDirectDrawSurfa
return hr;
}
surface_impl = impl_from_IDirectDrawSurface7(surface7);
*surface = (IDirectDrawSurface4 *)surface_impl;
*surface = &surface_impl->IDirectDrawSurface4_iface;
return hr;
}
......@@ -3561,7 +3561,7 @@ static HRESULT WINAPI ddraw4_CreateSurface(IDirectDraw4 *iface,
return hr;
}
*surface = (IDirectDrawSurface4 *)impl;
*surface = &impl->IDirectDrawSurface4_iface;
ddraw_set_surface_version(impl, 4);
IDirectDraw7_Release(&This->IDirectDraw7_iface);
IDirectDraw4_AddRef(iface);
......@@ -4257,7 +4257,7 @@ static HRESULT WINAPI ddraw4_DuplicateSurface(IDirectDraw4 *iface, IDirectDrawSu
return hr;
}
dst_impl = impl_from_IDirectDrawSurface7(dst7);
*dst = (IDirectDrawSurface4 *)dst_impl;
*dst = &dst_impl->IDirectDrawSurface4_iface;
return hr;
}
......
......@@ -153,6 +153,7 @@ struct IDirectDrawSurfaceImpl
{
/* IUnknown fields */
IDirectDrawSurface7 IDirectDrawSurface7_iface;
IDirectDrawSurface4 IDirectDrawSurface4_iface;
IDirectDrawSurface3 IDirectDrawSurface3_iface;
const IDirectDrawGammaControlVtbl *IDirectDrawGammaControl_vtbl;
const IDirect3DTexture2Vtbl *IDirect3DTexture2_vtbl;
......@@ -225,6 +226,11 @@ static inline IDirectDrawSurfaceImpl *impl_from_IDirectDrawSurface3(IDirectDrawS
return CONTAINING_RECORD(iface, IDirectDrawSurfaceImpl, IDirectDrawSurface3_iface);
}
static inline IDirectDrawSurfaceImpl *impl_from_IDirectDrawSurface4(IDirectDrawSurface4 *iface)
{
return CONTAINING_RECORD(iface, IDirectDrawSurfaceImpl, IDirectDrawSurface4_iface);
}
static inline IDirectDrawSurfaceImpl *impl_from_IDirectDrawSurface7(IDirectDrawSurface7 *iface)
{
return CONTAINING_RECORD(iface, IDirectDrawSurfaceImpl, IDirectDrawSurface7_iface);
......
......@@ -1961,7 +1961,7 @@ static HRESULT WINAPI IDirect3DDeviceImpl_3_GetRenderTarget(IDirect3DDevice3 *if
hr = IDirect3DDevice7_GetRenderTarget((IDirect3DDevice7 *)This, &RenderTarget7);
if(hr != D3D_OK) return hr;
RenderTargetImpl = impl_from_IDirectDrawSurface7(RenderTarget7);
*RenderTarget = (IDirectDrawSurface4 *)RenderTargetImpl;
*RenderTarget = &RenderTargetImpl->IDirectDrawSurface4_iface;
return D3D_OK;
}
......
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