Commit 1b3399ce authored by Józef Kucia's avatar Józef Kucia Committed by Alexandre Julliard

d3d11: Fix return values returned by D3D11CreateDevice functions.

parent dad14241
......@@ -295,7 +295,7 @@ HRESULT WINAPI D3D11CreateDevice(IDXGIAdapter *adapter, D3D_DRIVER_TYPE driver_t
else
ID3D11Device_Release(device);
return S_OK;
return (device_out || immediate_context) ? S_OK : S_FALSE;
}
HRESULT WINAPI D3D11CreateDeviceAndSwapChain(IDXGIAdapter *adapter, D3D_DRIVER_TYPE driver_type,
......@@ -367,7 +367,7 @@ HRESULT WINAPI D3D11CreateDeviceAndSwapChain(IDXGIAdapter *adapter, D3D_DRIVER_T
else
ID3D11Device_Release(device);
return S_OK;
return (swapchain || device_out || immediate_context) ? S_OK : S_FALSE;
cleanup:
ID3D11Device_Release(device);
......
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