Examples: SDL2+DX11, SDL3+DX11, Win32+DX10, Win32+DX11: fixed one resource leak. (#9010, #4350)

This commit is contained in:
ocornut
2025-10-16 13:48:24 +02:00
parent e1b27ce51e
commit aa9f6db698
5 changed files with 22 additions and 0 deletions

View File

@@ -35,6 +35,16 @@ HOW TO UPDATE?
and API updates have been a little more frequent lately. They are documented below and in imgui.cpp and should not affect all users.
- Please report any issue!
-----------------------------------------------------------------------
VERSION 1.92.5 WIP (In Progress)
-----------------------------------------------------------------------
Docking+Viewports Branch:
- Examples: SDL2+DX11, SDL3+DX11, Win32+DX10, Win32+DX11: fixed one resource
leak from the use of MakeWindowAssociation() in 1.92.4. (#9010, #4350) [@o-3-o]
-----------------------------------------------------------------------
VERSION 1.92.4 (Released 2025-10-14)
-----------------------------------------------------------------------

View File

@@ -261,7 +261,10 @@ bool CreateDeviceD3D(HWND hWnd)
// - This must be done for all windows associated to the device. Our DX11 backend does this automatically for secondary viewports that it creates.
IDXGIFactory* pSwapChainFactory;
if (SUCCEEDED(g_pSwapChain->GetParent(IID_PPV_ARGS(&pSwapChainFactory))))
{
pSwapChainFactory->MakeWindowAssociation(hWnd, DXGI_MWA_NO_ALT_ENTER);
pSwapChainFactory->Release();
}
CreateRenderTarget();
return true;

View File

@@ -256,7 +256,10 @@ bool CreateDeviceD3D(HWND hWnd)
// - This must be done for all windows associated to the device. Our DX11 backend does this automatically for secondary viewports that it creates.
IDXGIFactory* pSwapChainFactory;
if (SUCCEEDED(g_pSwapChain->GetParent(IID_PPV_ARGS(&pSwapChainFactory))))
{
pSwapChainFactory->MakeWindowAssociation(hWnd, DXGI_MWA_NO_ALT_ENTER);
pSwapChainFactory->Release();
}
CreateRenderTarget();
return true;

View File

@@ -246,7 +246,10 @@ bool CreateDeviceD3D(HWND hWnd)
// - This must be done for all windows associated to the device. Our DX11 backend does this automatically for secondary viewports that it creates.
IDXGIFactory* pSwapChainFactory;
if (SUCCEEDED(g_pSwapChain->GetParent(IID_PPV_ARGS(&pSwapChainFactory))))
{
pSwapChainFactory->MakeWindowAssociation(hWnd, DXGI_MWA_NO_ALT_ENTER);
pSwapChainFactory->Release();
}
CreateRenderTarget();
return true;

View File

@@ -250,7 +250,10 @@ bool CreateDeviceD3D(HWND hWnd)
// - This must be done for all windows associated to the device. Our DX11 backend does this automatically for secondary viewports that it creates.
IDXGIFactory* pSwapChainFactory;
if (SUCCEEDED(g_pSwapChain->GetParent(IID_PPV_ARGS(&pSwapChainFactory))))
{
pSwapChainFactory->MakeWindowAssociation(hWnd, DXGI_MWA_NO_ALT_ENTER);
pSwapChainFactory->Release();
}
CreateRenderTarget();
return true;