1
0
mirror of https://github.com/doitsujin/dxvk.git synced 2025-01-29 17:52:18 +01:00

[dxgi] Fix some argument checks (#205)

Changed according to wine's tests.
This commit is contained in:
notaz 2018-03-26 08:38:37 +03:00 committed by Philip Rebohle
parent 675b1c5b8c
commit f02b44f440
2 changed files with 5 additions and 2 deletions

View File

@ -71,6 +71,9 @@ namespace dxvk {
HRESULT STDMETHODCALLTYPE DxgiAdapter::GetDesc(DXGI_ADAPTER_DESC* pDesc) {
if (pDesc == nullptr)
return E_INVALIDARG;
DXGI_ADAPTER_DESC1 desc1;
HRESULT hr = this->GetDesc1(&desc1);

View File

@ -50,8 +50,8 @@ namespace dxvk {
IUnknown* pDevice,
DXGI_SWAP_CHAIN_DESC* pDesc,
IDXGISwapChain** ppSwapChain) {
if (ppSwapChain == nullptr || pDesc == nullptr)
return E_INVALIDARG;
if (ppSwapChain == nullptr || pDesc == nullptr || pDevice == NULL)
return DXGI_ERROR_INVALID_CALL;
try {
*ppSwapChain = ref(new DxgiSwapChain(this, pDevice, pDesc));