Skip to content

Commit

Permalink
Handle D3D12 window changes same as D3D11
Browse files Browse the repository at this point in the history
  • Loading branch information
Kaldaien committed Sep 1, 2023
1 parent 7b54b3e commit 54bdcfa
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions src/render/dxgi/dxgi.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -269,13 +269,11 @@ ImGui_DX12Startup ( IDXGISwapChain* pSwapChain )
{
if (swap_desc.OutputWindow != nullptr)
{
HWND hWndRoot = GetAncestor (swap_desc.OutputWindow, GA_ROOT);

if (rb.windows.focus.hwnd != hWndRoot)
rb.windows.setFocus (hWndRoot);
if (rb.windows.focus.hwnd != swap_desc.OutputWindow)
rb.windows.setFocus (swap_desc.OutputWindow);

if (rb.windows.device.hwnd == nullptr)
rb.windows.setDevice (swap_desc.OutputWindow);
rb.windows.setDevice (swap_desc.OutputWindow);
}
}

Expand Down

0 comments on commit 54bdcfa

Please sign in to comment.