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:
parent
675b1c5b8c
commit
f02b44f440
@ -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);
|
||||
|
||||
|
@ -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));
|
||||
|
Loading…
x
Reference in New Issue
Block a user