[dxgi] Restore display mode even when the window got destroyed

This commit is contained in:
Philip Rebohle 2018-04-30 20:15:35 +02:00
parent 46f2e4d864
commit 4c298d486d
1 changed files with 4 additions and 2 deletions

View File

@ -60,8 +60,10 @@ namespace dxvk {
DxgiSwapChain::~DxgiSwapChain() {
if (IsWindow(m_desc.OutputWindow) && !m_desc.Windowed)
LeaveFullscreenMode();
Com<IDXGIOutput> output;
if (SUCCEEDED(m_adapter->GetOutputFromMonitor(m_monitor, &output)))
RestoreDisplayMode(output.ptr());
}