diff --git a/docs/CHANGELOG.txt b/docs/CHANGELOG.txt index f274ba31..43c70d33 100644 --- a/docs/CHANGELOG.txt +++ b/docs/CHANGELOG.txt @@ -94,6 +94,7 @@ Other Changes: - Backends: SDL: Added ImGui_ImplSDL2_InitForMetal() for API consistency (even though the function currently does nothing). - Backends: SDL: Fixed mapping for ImGuiKey_KeyPadEnter. (#3031) [@Davido71] +- Examples: Win32+DX12: Fixed resizing main window, enabled debug layer. (#3087, #3115) [@sergeyn] - Examples: SDL+DX11: Fixed resizing main window. (#3057) [@joeslay] - Examples: Added SDL+Metal example application. (#3017) [@coding-jackalope] diff --git a/examples/example_win32_directx12/main.cpp b/examples/example_win32_directx12/main.cpp index 139dea6e..8642ad45 100644 --- a/examples/example_win32_directx12/main.cpp +++ b/examples/example_win32_directx12/main.cpp @@ -9,7 +9,9 @@ #include #include -//#define DX12_ENABLE_DEBUG_LAYER +#ifdef _DEBUG +#define DX12_ENABLE_DEBUG_LAYER +#endif #ifdef DX12_ENABLE_DEBUG_LAYER #include @@ -441,6 +443,7 @@ LRESULT WINAPI WndProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam) case WM_SIZE: if (g_pd3dDevice != NULL && wParam != SIZE_MINIMIZED) { + WaitForLastSubmittedFrame(); ImGui_ImplDX12_InvalidateDeviceObjects(); CleanupRenderTarget(); ResizeSwapChain(hWnd, (UINT)LOWORD(lParam), (UINT)HIWORD(lParam));