Frontend: Fix error in swap chain ResizeBuffers()

This commit is contained in:
Connor McLaughlin 2020-01-20 17:26:57 +10:00
parent b9538a55f5
commit ed1ac6df4a
2 changed files with 4 additions and 2 deletions

View File

@ -184,7 +184,8 @@ void D3D11DisplayWindow::onWindowResized(int width, int height)
m_swap_chain_rtv.Reset(); m_swap_chain_rtv.Reset();
HRESULT hr = m_swap_chain->ResizeBuffers(0, 0, 0, DXGI_FORMAT_UNKNOWN, 0); HRESULT hr = m_swap_chain->ResizeBuffers(0, 0, 0, DXGI_FORMAT_UNKNOWN,
m_allow_tearing_supported ? DXGI_SWAP_CHAIN_FLAG_ALLOW_TEARING : 0);
if (FAILED(hr)) if (FAILED(hr))
Log_ErrorPrintf("ResizeBuffers() failed: 0x%08X", hr); Log_ErrorPrintf("ResizeBuffers() failed: 0x%08X", hr);

View File

@ -182,7 +182,8 @@ void D3D11HostDisplay::WindowResized()
m_swap_chain_rtv.Reset(); m_swap_chain_rtv.Reset();
HRESULT hr = m_swap_chain->ResizeBuffers(0, 0, 0, DXGI_FORMAT_UNKNOWN, 0); HRESULT hr = m_swap_chain->ResizeBuffers(0, 0, 0, DXGI_FORMAT_UNKNOWN,
m_allow_tearing_supported ? DXGI_SWAP_CHAIN_FLAG_ALLOW_TEARING : 0);
if (FAILED(hr)) if (FAILED(hr))
Log_ErrorPrintf("ResizeBuffers() failed: 0x%08X", hr); Log_ErrorPrintf("ResizeBuffers() failed: 0x%08X", hr);