From 10e5af2ddf9b3cb545f1a90ebd2b5ee2078446cb Mon Sep 17 00:00:00 2001 From: lightningterror <18107717+lightningterror@users.noreply.github.com> Date: Fri, 8 Dec 2023 17:24:34 +0100 Subject: [PATCH] GS/D3D12: Fix variable is reassigned a value before the old one has been used warning. Codacy. --- pcsx2/GS/Renderers/DX12/GSDevice12.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pcsx2/GS/Renderers/DX12/GSDevice12.cpp b/pcsx2/GS/Renderers/DX12/GSDevice12.cpp index fee13e2c5f..bc5c64b146 100644 --- a/pcsx2/GS/Renderers/DX12/GSDevice12.cpp +++ b/pcsx2/GS/Renderers/DX12/GSDevice12.cpp @@ -861,6 +861,9 @@ bool GSDevice12::CreateSwapChain() Console.WriteLn("Creating a %dx%d windowed swap chain", swap_chain_desc.Width, swap_chain_desc.Height); hr = m_dxgi_factory->CreateSwapChainForHwnd( m_command_queue.get(), window_hwnd, &swap_chain_desc, nullptr, nullptr, m_swap_chain.put()); + + if (FAILED(hr)) + Console.Warning("Failed to create windowed swap chain."); } hr = m_dxgi_factory->MakeWindowAssociation(window_hwnd, DXGI_MWA_NO_WINDOW_CHANGES);