From 326eb0bf80209892712d3b6211124a13d7a522c9 Mon Sep 17 00:00:00 2001 From: Andrew Eikum Date: Mon, 17 Jun 2019 09:28:20 -0500 Subject: [PATCH] [dxgi] Don't fail leaving fullscreen if window is already destroyed Unreal Engine 4 games destroy the window, then call SetFullscreenMode(FALSE). If this call fails, they pop up an error dialog. Wine tests show that this call should succeed. --- src/dxgi/dxgi_swapchain.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/dxgi/dxgi_swapchain.cpp b/src/dxgi/dxgi_swapchain.cpp index 3fd62c26b..68dce9728 100644 --- a/src/dxgi/dxgi_swapchain.cpp +++ b/src/dxgi/dxgi_swapchain.cpp @@ -567,7 +567,7 @@ namespace dxvk { HRESULT DxgiSwapChain::LeaveFullscreenMode() { if (!IsWindow(m_window)) - return DXGI_ERROR_NOT_CURRENTLY_AVAILABLE; + return S_OK; if (FAILED(RestoreDisplayMode(m_monitor))) Logger::warn("DXGI: LeaveFullscreenMode: Failed to restore display mode");