Commit 7fb0374f authored by Steve Lhomme's avatar Steve Lhomme Committed by Jean-Baptiste Kempf

direct3d11: check more return values

Signed-off-by: Jean-Baptiste Kempf's avatarJean-Baptiste Kempf <jb@videolan.org>
parent 3e5d911b
......@@ -648,6 +648,10 @@ static HRESULT UpdateBackBuffer(vout_display_t *vd)
hr = ID3D11Device_CreateRenderTargetView(sys->d3ddevice, (ID3D11Resource *)pBackBuffer, NULL, &sys->d3drenderTargetView);
ID3D11Texture2D_Release(pBackBuffer);
if (FAILED(hr)) {
msg_Err(vd, "Failed to create the target view. (hr=0x%lX)", hr);
return hr;
}
D3D11_TEXTURE2D_DESC deptTexDesc;
memset(&deptTexDesc, 0,sizeof(deptTexDesc));
......@@ -785,7 +789,11 @@ static void Display(vout_display_t *vd, picture_t *picture, subpicture_t *subpic
}
}
IDXGISwapChain_Present(sys->dxgiswapChain, 0, 0);
HRESULT hr = IDXGISwapChain_Present(sys->dxgiswapChain, 0, 0);
if (hr == DXGI_ERROR_DEVICE_REMOVED || hr == DXGI_ERROR_DEVICE_RESET)
{
/* TODO device lost */
}
picture_Release(picture);
if (subpicture)
......
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