diff --git a/src/dxgi/dxgi_swapchain.cpp b/src/dxgi/dxgi_swapchain.cpp index 87d639ff..2f4be95b 100644 --- a/src/dxgi/dxgi_swapchain.cpp +++ b/src/dxgi/dxgi_swapchain.cpp @@ -388,15 +388,13 @@ namespace dxvk { HRESULT DxgiSwapChain::EnterFullscreenMode(IDXGIOutput *pTarget) { - m_output = static_cast(pTarget); + Com output = static_cast(pTarget); - if (m_output == nullptr) { - Com output; + if (output == nullptr) { if (FAILED(GetContainingOutput(&output))) { Logger::err("DxgiSwapChain: Failed to enter fullscreen mode: Cannot query containing output"); return E_FAIL; } - m_output = static_cast(output.ptr()); } // Update swap chain description @@ -420,7 +418,7 @@ namespace dxvk { // Move the window so that it covers the entire output DXGI_OUTPUT_DESC desc; - m_output->GetDesc(&desc); + output->GetDesc(&desc); const RECT rect = desc.DesktopCoordinates; diff --git a/src/dxgi/dxgi_swapchain.h b/src/dxgi/dxgi_swapchain.h index e1222643..db38d27d 100644 --- a/src/dxgi/dxgi_swapchain.h +++ b/src/dxgi/dxgi_swapchain.h @@ -102,7 +102,6 @@ namespace dxvk { Com m_factory; Com m_adapter; Com m_device; - Com m_output; Com m_presentDevice; DXGI_SWAP_CHAIN_DESC m_desc;