From 9064dbd4044a6975a050e99e56748f7e0cbc3c54 Mon Sep 17 00:00:00 2001 From: ocornut Date: Mon, 2 Oct 2023 15:24:39 +0200 Subject: [PATCH] Backends: DX9: Fixed incorrect assert triggering on reopening session with minimized windows. (#3424) --- backends/imgui_impl_dx9.cpp | 2 +- docs/CHANGELOG.txt | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/backends/imgui_impl_dx9.cpp b/backends/imgui_impl_dx9.cpp index 7c14c402f..0aeb43dc9 100644 --- a/backends/imgui_impl_dx9.cpp +++ b/backends/imgui_impl_dx9.cpp @@ -511,7 +511,7 @@ static void ImGui_ImplDX9_SwapBuffers(ImGuiViewport* viewport, void*) ImGui_ImplDX9_ViewportData* vd = (ImGui_ImplDX9_ViewportData*)viewport->RendererUserData; HRESULT hr = vd->SwapChain->Present(nullptr, nullptr, vd->d3dpp.hDeviceWindow, nullptr, 0); // Let main application handle D3DERR_DEVICELOST by resetting the device. - IM_ASSERT(hr == D3D_OK || hr == D3DERR_DEVICELOST); + IM_ASSERT(SUCCEEDED(hr) || hr == D3DERR_DEVICELOST); } static void ImGui_ImplDX9_InitPlatformInterface() diff --git a/docs/CHANGELOG.txt b/docs/CHANGELOG.txt index 9f6255dba..bb0a73d8e 100644 --- a/docs/CHANGELOG.txt +++ b/docs/CHANGELOG.txt @@ -130,6 +130,7 @@ Docking+Viewports Branch: prevent further filter from running, namely the one that prevent docking over a popup. - Backends: GLFW: Fixed an assertion in situation where the WndProc handler is different between main and secondary viewport (may happen due to third-party hooks). (#6889) +- Backends: DX9: Fixed incorrect assert triggering on reopening session with minimized windows. (#3424) -----------------------------------------------------------------------