Fix D3D12On7 presents not properly adding frame capturer

This commit is contained in:
baldurk
2020-08-14 13:10:15 +01:00
parent 73248c8488
commit bf2cee8bc5
@@ -838,6 +838,20 @@ HRESULT STDMETHODCALLTYPE WrappedID3D12CommandQueue::Present(
m_pDevice->ReleaseSwapchainResources(this, 0, NULL, NULL);
}
if(m_pPresentHWND != hWindow)
{
if(m_pPresentHWND != NULL)
{
Keyboard::RemoveInputWindow(WindowingSystem::Win32, m_pPresentHWND);
RenderDoc::Inst().RemoveFrameCapturer(m_pDevice->GetFrameCapturerDevice(), m_pPresentHWND);
}
Keyboard::AddInputWindow(WindowingSystem::Win32, hWindow);
RenderDoc::Inst().AddFrameCapturer(m_pDevice->GetFrameCapturerDevice(), hWindow,
m_pDevice->GetFrameCapturer());
}
m_pPresentSource = pSourceTex2D;
m_pPresentHWND = hWindow;