dxgi: Return DXGI_ERROR_NOT_CURRENTLY_AVAILABLE if setting the fullscreen state failed.

Signed-off-by: Andrew Eikum <aeikum@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Andrew Eikum 2019-06-20 02:29:47 +04:30 committed by Alexandre Julliard
parent 67110d37e9
commit 45166d3313
1 changed files with 9 additions and 9 deletions

View File

@ -385,18 +385,18 @@ static HRESULT STDMETHODCALLTYPE DECLSPEC_HOTPATCH d3d11_swapchain_SetFullscreen
swapchain_desc.windowed = !fullscreen;
hr = wined3d_swapchain_set_fullscreen(swapchain->wined3d_swapchain, &swapchain_desc, NULL);
wined3d_mutex_unlock();
if (SUCCEEDED(hr))
if (FAILED(hr))
{
if (target)
IDXGIOutput_Release(target);
return DXGI_ERROR_NOT_CURRENTLY_AVAILABLE;
}
if (swapchain->target)
IDXGIOutput_Release(swapchain->target);
swapchain->target = target;
return S_OK;
}
if (target)
IDXGIOutput_Release(target);
return hr;
return S_OK;
}
static HRESULT STDMETHODCALLTYPE d3d11_swapchain_GetFullscreenState(IDXGISwapChain1 *iface,