diff --git a/dlls/d3d8/device.c b/dlls/d3d8/device.c index 68b0dff626c..51679ccb506 100644 --- a/dlls/d3d8/device.c +++ b/dlls/d3d8/device.c @@ -138,8 +138,8 @@ static HRESULT WINAPI IDirect3DDevice8Impl_GetDirect3D(LPDIRECT3DDEVICE8 iface, hr = IWineD3DDevice_GetDirect3D(This->WineD3DDevice, &pWineD3D); if (hr == D3D_OK && pWineD3D != NULL) { - IWineD3DResource_GetParent((IWineD3DResource *)pWineD3D,(IUnknown **)ppD3D8); - IWineD3DResource_Release((IWineD3DResource *)pWineD3D); + IWineD3D_GetParent(pWineD3D,(IUnknown **)ppD3D8); + IWineD3D_Release(pWineD3D); } else { FIXME("Call to IWineD3DDevice_GetDirect3D failed\n"); *ppD3D8 = NULL; @@ -678,8 +678,8 @@ static HRESULT WINAPI IDirect3DDevice8Impl_GetRenderTarget(LPDIRECT3DDEVICE8 i hr = IWineD3DDevice_GetRenderTarget(This->WineD3DDevice, 0, &pRenderTarget); if (hr == D3D_OK && pRenderTarget != NULL) { - IWineD3DResource_GetParent((IWineD3DResource *)pRenderTarget,(IUnknown**)ppRenderTarget); - IWineD3DResource_Release((IWineD3DResource *)pRenderTarget); + IWineD3DSurface_GetParent(pRenderTarget,(IUnknown**)ppRenderTarget); + IWineD3DSurface_Release(pRenderTarget); } else { FIXME("Call to IWineD3DDevice_GetRenderTarget failed\n"); *ppRenderTarget = NULL; @@ -700,8 +700,8 @@ static HRESULT WINAPI IDirect3DDevice8Impl_GetDepthStencilSurface(LPDIRECT3DDE hr=IWineD3DDevice_GetDepthStencilSurface(This->WineD3DDevice,&pZStencilSurface); if(hr == D3D_OK && pZStencilSurface != NULL){ - IWineD3DResource_GetParent((IWineD3DResource *)pZStencilSurface,(IUnknown**)ppZStencilSurface); - IWineD3DResource_Release((IWineD3DResource *)pZStencilSurface); + IWineD3DSurface_GetParent(pZStencilSurface,(IUnknown**)ppZStencilSurface); + IWineD3DSurface_Release(pZStencilSurface); }else{ FIXME("Call to IWineD3DDevice_GetDepthStencilSurface failed\n"); *ppZStencilSurface = NULL; @@ -1315,8 +1315,8 @@ static HRESULT WINAPI IDirect3DDevice8Impl_GetIndices(LPDIRECT3DDEVICE8 iface, I rc = IWineD3DDevice_GetIndices(This->WineD3DDevice, &retIndexData, &tmp); if (D3D_OK == rc && NULL != retIndexData) { - IWineD3DVertexBuffer_GetParent(retIndexData, (IUnknown **)ppIndexData); - IWineD3DVertexBuffer_Release(retIndexData); + IWineD3DIndexBuffer_GetParent(retIndexData, (IUnknown **)ppIndexData); + IWineD3DIndexBuffer_Release(retIndexData); } else { if(rc != D3D_OK) FIXME("Call to GetIndices failed\n"); *ppIndexData = NULL;