Commit 61087377 authored by Markus Amsler's avatar Markus Amsler Committed by Alexandre Julliard

d3d9: Use correct COM macros.

parent 3127eac2
......@@ -100,8 +100,8 @@ HRESULT WINAPI IDirect3DDevice9Impl_GetDirect3D(LPDIRECT3DDEVICE9 iface, IDire
hr = IWineD3DDevice_GetDirect3D(This->WineD3DDevice, &pWineD3D);
if (hr == D3D_OK && pWineD3D != NULL)
{
IWineD3DResource_GetParent((IWineD3DResource *)pWineD3D,(IUnknown **)ppD3D9);
IWineD3DResource_Release((IWineD3DResource *)pWineD3D);
IWineD3D_GetParent(pWineD3D,(IUnknown **)ppD3D9);
IWineD3D_Release(pWineD3D);
} else {
FIXME("Call to IWineD3DDevice_GetDirect3D failed\n");
*ppD3D9 = NULL;
......@@ -404,8 +404,8 @@ static HRESULT WINAPI IDirect3DDevice9Impl_GetRenderTarget(LPDIRECT3DDEVICE9 i
hr=IWineD3DDevice_GetRenderTarget(This->WineD3DDevice,RenderTargetIndex,&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;
......@@ -435,8 +435,8 @@ static HRESULT WINAPI IDirect3DDevice9Impl_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_GetRenderTarget failed\n");
*ppZStencilSurface = NULL;
......@@ -838,8 +838,8 @@ static HRESULT WINAPI IDirect3DDevice9Impl_GetIndices(LPDIRECT3DDEVICE9 iface,
rc = IWineD3DDevice_GetIndices(This->WineD3DDevice, &retIndexData, &tmp);
if (rc == D3D_OK && 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;
......
......@@ -321,8 +321,8 @@ HRESULT WINAPI IDirect3DDevice9Impl_GetVertexDeclaration(LPDIRECT3DDEVICE9 ifa
*ppDecl = NULL;
hr = IWineD3DDevice_GetVertexDeclaration(This->WineD3DDevice, &pTest);
if (hr == D3D_OK && NULL != pTest) {
IWineD3DResource_GetParent(pTest, (IUnknown **)ppDecl);
IWineD3DResource_Release(pTest);
IWineD3DVertexDeclaration_GetParent(pTest, (IUnknown **)ppDecl);
IWineD3DVertexDeclaration_Release(pTest);
} else {
*ppDecl = NULL;
}
......
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