ddraw: COM cleanup for IDirect3DDevice interface.

This commit is contained in:
Ričardas Barkauskas 2011-10-17 16:57:11 +03:00 committed by Alexandre Julliard
parent a0c9ab7894
commit d5912c533f
3 changed files with 7 additions and 7 deletions

View File

@ -280,7 +280,7 @@ struct IDirect3DDeviceImpl
const IDirect3DDevice7Vtbl *lpVtbl;
const IDirect3DDevice3Vtbl *IDirect3DDevice3_vtbl;
const IDirect3DDevice2Vtbl *IDirect3DDevice2_vtbl;
const IDirect3DDeviceVtbl *IDirect3DDevice_vtbl;
IDirect3DDevice IDirect3DDevice_iface;
LONG ref;
/* Other object connections */
@ -327,7 +327,7 @@ WINED3DZBUFFERTYPE IDirect3DDeviceImpl_UpdateDepthStencil(IDirect3DDeviceImpl *T
static inline IDirect3DDeviceImpl *impl_from_IDirect3DDevice(IDirect3DDevice *iface)
{
return CONTAINING_RECORD(iface, IDirect3DDeviceImpl, IDirect3DDevice_vtbl);
return CONTAINING_RECORD(iface, IDirect3DDeviceImpl, IDirect3DDevice_iface);
}
static inline IDirect3DDeviceImpl *device_from_device2(IDirect3DDevice2 *iface)

View File

@ -163,7 +163,7 @@ IDirect3DDeviceImpl_7_QueryInterface(IDirect3DDevice7 *iface,
/* Direct3DDevice */
else if ( IsEqualGUID( &IID_IDirect3DDevice , refiid ) )
{
*obj = &This->IDirect3DDevice_vtbl;
*obj = &This->IDirect3DDevice_iface;
TRACE("(%p) Returning IDirect3DDevice interface at %p\n", This, *obj);
}
else if ( IsEqualGUID( &IID_IDirect3DDevice2 , refiid ) ) {
@ -329,7 +329,7 @@ IDirect3DDeviceImpl_7_Release(IDirect3DDevice7 *iface)
{
/* No FIXME here because this might happen because of sloppy applications. */
WARN("Leftover matrix handle %#x (%p), deleting.\n", i + 1, entry->object);
IDirect3DDevice_DeleteMatrix((IDirect3DDevice *)&This->IDirect3DDevice_vtbl, i + 1);
IDirect3DDevice_DeleteMatrix(&This->IDirect3DDevice_iface, i + 1);
break;
}
@ -6741,7 +6741,7 @@ IDirect3DDeviceImpl *unsafe_impl_from_IDirect3DDevice(IDirect3DDevice *iface)
{
if (!iface) return NULL;
assert(iface->lpVtbl == &d3d_device1_vtbl);
return CONTAINING_RECORD(iface, IDirect3DDeviceImpl, IDirect3DDevice_vtbl);
return CONTAINING_RECORD(iface, IDirect3DDeviceImpl, IDirect3DDevice_iface);
}
/*****************************************************************************
@ -6788,7 +6788,7 @@ HRESULT d3d_device_init(IDirect3DDeviceImpl *device, IDirectDrawImpl *ddraw, IDi
device->IDirect3DDevice3_vtbl = &d3d_device3_vtbl;
device->IDirect3DDevice2_vtbl = &d3d_device2_vtbl;
device->IDirect3DDevice_vtbl = &d3d_device1_vtbl;
device->IDirect3DDevice_iface.lpVtbl = &d3d_device1_vtbl;
device->ref = 1;
device->ddraw = ddraw;
device->target = target;

View File

@ -134,7 +134,7 @@ static HRESULT WINAPI ddraw_surface7_QueryInterface(IDirectDrawSurface7 *iface,
if (d3d)
{
*obj = (IDirect3DDevice *)&((IDirect3DDeviceImpl *)d3d)->IDirect3DDevice_vtbl;
*obj = &((IDirect3DDeviceImpl *)d3d)->IDirect3DDevice_iface;
TRACE("(%p) Returning IDirect3DDevice interface at %p\n", This, *obj);
return S_OK;
}