D3D12HostDisplay: Fix debug violation in DestroyRenderSurface()

This commit is contained in:
Connor McLaughlin 2021-07-13 14:15:53 +10:00
parent eb5a2a340c
commit 5fa07999e7
1 changed files with 3 additions and 0 deletions

View File

@ -458,6 +458,9 @@ bool D3D12HostDisplay::ChangeRenderWindow(const WindowInfo& new_wi)
void D3D12HostDisplay::DestroyRenderSurface()
{
// For some reason if we don't execute the command list here, the swap chain is in use.. not sure where.
g_d3d12_context->ExecuteCommandList(true);
if (IsFullscreen())
SetFullscreen(false, 0, 0, 0.0f);