d3d11: Fix return values returned by D3D11CreateDevice functions.
Signed-off-by: Józef Kucia <jkucia@codeweavers.com> Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
dad1424188
commit
1b3399ce07
|
@ -295,7 +295,7 @@ HRESULT WINAPI D3D11CreateDevice(IDXGIAdapter *adapter, D3D_DRIVER_TYPE driver_t
|
||||||
else
|
else
|
||||||
ID3D11Device_Release(device);
|
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,
|
HRESULT WINAPI D3D11CreateDeviceAndSwapChain(IDXGIAdapter *adapter, D3D_DRIVER_TYPE driver_type,
|
||||||
|
@ -367,7 +367,7 @@ HRESULT WINAPI D3D11CreateDeviceAndSwapChain(IDXGIAdapter *adapter, D3D_DRIVER_T
|
||||||
else
|
else
|
||||||
ID3D11Device_Release(device);
|
ID3D11Device_Release(device);
|
||||||
|
|
||||||
return S_OK;
|
return (swapchain || device_out || immediate_context) ? S_OK : S_FALSE;
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
ID3D11Device_Release(device);
|
ID3D11Device_Release(device);
|
||||||
|
|
Loading…
Reference in New Issue