GS/D3D12: Fix variable is reassigned a value before the old one has been used warning.

Codacy.
This commit is contained in:
lightningterror 2023-12-08 17:24:34 +01:00
parent 724f92562c
commit 10e5af2ddf
1 changed files with 3 additions and 0 deletions

View File

@ -861,6 +861,9 @@ bool GSDevice12::CreateSwapChain()
Console.WriteLn("Creating a %dx%d windowed swap chain", swap_chain_desc.Width, swap_chain_desc.Height); Console.WriteLn("Creating a %dx%d windowed swap chain", swap_chain_desc.Width, swap_chain_desc.Height);
hr = m_dxgi_factory->CreateSwapChainForHwnd( hr = m_dxgi_factory->CreateSwapChainForHwnd(
m_command_queue.get(), window_hwnd, &swap_chain_desc, nullptr, nullptr, m_swap_chain.put()); 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); hr = m_dxgi_factory->MakeWindowAssociation(window_hwnd, DXGI_MWA_NO_WINDOW_CHANGES);