1
0
mirror of https://github.com/doitsujin/dxvk.git synced 2025-01-19 05:52:11 +01:00

[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.
This commit is contained in:
Andrew Eikum 2019-06-17 09:28:20 -05:00 committed by Philip Rebohle
parent 62372f5d47
commit 326eb0bf80

View File

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