TestEngine: Added hook to notify test engine of a removed imgui context.
diff --git a/imgui.cpp b/imgui.cpp
index 2b5983a..176326e 100644
--- a/imgui.cpp
+++ b/imgui.cpp
@@ -3916,6 +3916,11 @@
SetCurrentContext(backup_context);
}
+ // Notify hooked test engine, if any
+#ifdef IMGUI_ENABLE_TEST_ENGINE
+ ImGuiTestEngineHook_Shutdown(context);
+#endif
+
// Clear everything else
for (int i = 0; i < g.Windows.Size; i++)
IM_DELETE(g.Windows[i]);
diff --git a/imgui.h b/imgui.h
index 3751f2e..9c926c8 100644
--- a/imgui.h
+++ b/imgui.h
@@ -60,7 +60,7 @@
// Version
// (Integer encoded as XYYZZ for use in #if preprocessor conditionals. Work in progress versions typically starts at XYY99 then bounce up to XYY00, XYY01 etc. when release tagging happens)
#define IMGUI_VERSION "1.77"
-#define IMGUI_VERSION_NUM 17700
+#define IMGUI_VERSION_NUM 17701
#define IMGUI_CHECKVERSION() ImGui::DebugCheckVersionAndDataLayout(IMGUI_VERSION, sizeof(ImGuiIO), sizeof(ImGuiStyle), sizeof(ImVec2), sizeof(ImVec4), sizeof(ImDrawVert), sizeof(ImDrawIdx))
// Define attributes of all API symbols declarations (e.g. for DLL under Windows)
diff --git a/imgui_internal.h b/imgui_internal.h
index dd61fea..01a7a82 100644
--- a/imgui_internal.h
+++ b/imgui_internal.h
@@ -2028,8 +2028,8 @@
// [SECTION] Test Engine Hooks (imgui_test_engine)
//-----------------------------------------------------------------------------
-//#define IMGUI_ENABLE_TEST_ENGINE
#ifdef IMGUI_ENABLE_TEST_ENGINE
+extern void ImGuiTestEngineHook_Shutdown(ImGuiContext* ctx);
extern void ImGuiTestEngineHook_PreNewFrame(ImGuiContext* ctx);
extern void ImGuiTestEngineHook_PostNewFrame(ImGuiContext* ctx);
extern void ImGuiTestEngineHook_ItemAdd(ImGuiContext* ctx, const ImRect& bb, ImGuiID id);