diff --git a/dlls/ddraw/ddraw_private.h b/dlls/ddraw/ddraw_private.h index 635465f43be..39b103b4bdb 100644 --- a/dlls/ddraw/ddraw_private.h +++ b/dlls/ddraw/ddraw_private.h @@ -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) diff --git a/dlls/ddraw/device.c b/dlls/ddraw/device.c index 10a61d72500..37a778bc0d8 100644 --- a/dlls/ddraw/device.c +++ b/dlls/ddraw/device.c @@ -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; diff --git a/dlls/ddraw/surface.c b/dlls/ddraw/surface.c index f14374a3ce4..beb759fcfc9 100644 --- a/dlls/ddraw/surface.c +++ b/dlls/ddraw/surface.c @@ -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; }