1
0
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:
notaz 2018-03-27 02:58:33 +03:00 committed by Philip Rebohle
parent 60d6416e5f
commit 5411689789
3 changed files with 10 additions and 3 deletions

View File

@ -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));

View File

@ -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 {

View File

@ -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;
}