mirror of
https://github.com/doitsujin/dxvk.git
synced 2024-11-30 13:24:10 +01:00
[dxgi] More argument handling improvements (#211)
Fixes 11 tests + a crash.
This commit is contained in:
parent
60d6416e5f
commit
5411689789
@ -52,6 +52,8 @@ namespace dxvk {
|
||||
IDXGISwapChain** ppSwapChain) {
|
||||
if (ppSwapChain == nullptr || pDesc == nullptr || pDevice == NULL)
|
||||
return DXGI_ERROR_INVALID_CALL;
|
||||
if (pDesc->OutputWindow == nullptr)
|
||||
return DXGI_ERROR_INVALID_CALL;
|
||||
|
||||
try {
|
||||
*ppSwapChain = ref(new DxgiSwapChain(this, pDevice, pDesc));
|
||||
|
@ -9,7 +9,9 @@ namespace dxvk {
|
||||
if (riid != __uuidof(IDXGIFactory)
|
||||
&& riid != __uuidof(IDXGIFactory1)) {
|
||||
Logger::err("CreateDXGIFactory: Requested version of IDXGIFactory not supported");
|
||||
return DXGI_ERROR_UNSUPPORTED;
|
||||
Logger::err(str::format(riid));
|
||||
*ppFactory = nullptr;
|
||||
return E_NOINTERFACE;
|
||||
}
|
||||
|
||||
try {
|
||||
|
@ -139,8 +139,11 @@ namespace dxvk {
|
||||
if (pFullscreen != nullptr)
|
||||
*pFullscreen = !m_desc.Windowed;
|
||||
|
||||
if ((ppTarget != nullptr) && !m_desc.Windowed)
|
||||
hr = this->GetContainingOutput(ppTarget);
|
||||
if (ppTarget != nullptr) {
|
||||
*ppTarget = nullptr;
|
||||
if (!m_desc.Windowed)
|
||||
hr = this->GetContainingOutput(ppTarget);
|
||||
}
|
||||
|
||||
return hr;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user