d3d9: Having a NULL rendertarget isn't a failure.
This commit is contained in:
parent
5654544725
commit
59268f7924
|
@ -851,8 +851,8 @@ static HRESULT WINAPI IDirect3DDevice9Impl_SetRenderTarget(LPDIRECT3DDEVICE9EX
|
|||
|
||||
static HRESULT WINAPI IDirect3DDevice9Impl_GetRenderTarget(LPDIRECT3DDEVICE9EX iface, DWORD RenderTargetIndex, IDirect3DSurface9 **ppRenderTarget) {
|
||||
IDirect3DDevice9Impl *This = (IDirect3DDevice9Impl *)iface;
|
||||
HRESULT hr = D3D_OK;
|
||||
IWineD3DSurface *pRenderTarget;
|
||||
HRESULT hr;
|
||||
|
||||
TRACE("(%p) Relay\n" , This);
|
||||
|
||||
|
@ -863,13 +863,20 @@ static HRESULT WINAPI IDirect3DDevice9Impl_GetRenderTarget(LPDIRECT3DDEVICE9EX
|
|||
EnterCriticalSection(&d3d9_cs);
|
||||
hr=IWineD3DDevice_GetRenderTarget(This->WineD3DDevice,RenderTargetIndex,&pRenderTarget);
|
||||
|
||||
if (hr == D3D_OK && pRenderTarget != NULL) {
|
||||
IWineD3DSurface_GetParent(pRenderTarget,(IUnknown**)ppRenderTarget);
|
||||
IWineD3DSurface_Release(pRenderTarget);
|
||||
} else {
|
||||
FIXME("Call to IWineD3DDevice_GetRenderTarget failed\n");
|
||||
if (FAILED(hr))
|
||||
{
|
||||
FIXME("Call to IWineD3DDevice_GetRenderTarget failed, hr %#x\n", hr);
|
||||
}
|
||||
else if (!pRenderTarget)
|
||||
{
|
||||
*ppRenderTarget = NULL;
|
||||
}
|
||||
else
|
||||
{
|
||||
IWineD3DSurface_GetParent(pRenderTarget, (IUnknown **)ppRenderTarget);
|
||||
IWineD3DSurface_Release(pRenderTarget);
|
||||
}
|
||||
|
||||
LeaveCriticalSection(&d3d9_cs);
|
||||
|
||||
return hr;
|
||||
|
|
Loading…
Reference in New Issue