Commit 97f9b02a authored by Michael Stefaniuc's avatar Michael Stefaniuc Committed by Alexandre Julliard

ddraw: COM cleanup for the IDirect3D3 iface.

parent 67a55fee
......@@ -102,7 +102,7 @@ struct IDirectDrawImpl
const IDirectDraw2Vtbl *IDirectDraw2_vtbl;
const IDirectDrawVtbl *IDirectDraw_vtbl;
const IDirect3D7Vtbl *IDirect3D7_vtbl;
const IDirect3D3Vtbl *IDirect3D3_vtbl;
IDirect3D3 IDirect3D3_iface;
IDirect3D2 IDirect3D2_iface;
IDirect3D IDirect3D_iface;
const IWineD3DDeviceParentVtbl *device_parent_vtbl;
......@@ -184,11 +184,6 @@ HRESULT WINAPI ddraw_recreate_surfaces_cb(IDirectDrawSurface7 *surf,
DDSURFACEDESC2 *desc, void *Context) DECLSPEC_HIDDEN;
IWineD3DVertexDeclaration *ddraw_find_decl(IDirectDrawImpl *This, DWORD fvf) DECLSPEC_HIDDEN;
static inline IDirectDrawImpl *ddraw_from_d3d3(IDirect3D3 *iface)
{
return (IDirectDrawImpl *)((char*)iface - FIELD_OFFSET(IDirectDrawImpl, IDirect3D3_vtbl));
}
static inline IDirectDrawImpl *ddraw_from_d3d7(IDirect3D7 *iface)
{
return (IDirectDrawImpl *)((char*)iface - FIELD_OFFSET(IDirectDrawImpl, IDirect3D7_vtbl));
......
......@@ -151,7 +151,7 @@ IDirect3DDeviceImpl_7_QueryInterface(IDirect3DDevice7 *iface,
}
else if ( IsEqualGUID( &IID_IDirect3D3 , refiid ) )
{
*obj = &This->ddraw->IDirect3D3_vtbl;
*obj = &This->ddraw->IDirect3D3_iface;
TRACE("(%p) Returning IDirect3D3 interface at %p\n", This, *obj);
}
else if ( IsEqualGUID( &IID_IDirect3D7 , refiid ) )
......@@ -1737,8 +1737,8 @@ static HRESULT WINAPI IDirect3DDeviceImpl_3_GetDirect3D(IDirect3DDevice3 *iface,
if(!Direct3D3)
return DDERR_INVALIDPARAMS;
IDirect3D3_AddRef((IDirect3D3 *)&This->ddraw->IDirect3D3_vtbl);
*Direct3D3 = (IDirect3D3 *)&This->ddraw->IDirect3D3_vtbl;
IDirect3D3_AddRef(&This->ddraw->IDirect3D3_iface);
*Direct3D3 = &This->ddraw->IDirect3D3_iface;
TRACE(" returning interface %p\n", *Direct3D3);
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