From 015e67fc7c8839509019aac004bd2507cf3b3c14 Mon Sep 17 00:00:00 2001 From: Philip Rebohle Date: Thu, 12 Apr 2018 00:45:23 +0200 Subject: [PATCH] [dxgi] Replaced ugly pointer cast by more reasonable code --- src/dxgi/dxgi_swapchain.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/dxgi/dxgi_swapchain.cpp b/src/dxgi/dxgi_swapchain.cpp index 6d09fc06..ced136d3 100644 --- a/src/dxgi/dxgi_swapchain.cpp +++ b/src/dxgi/dxgi_swapchain.cpp @@ -392,10 +392,12 @@ namespace dxvk { m_output = static_cast(pTarget); if (m_output == nullptr) { - if (FAILED(GetContainingOutput(reinterpret_cast(&m_output)))) { + Com output; + 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