From ed34b93d20a661bd4b57e2be92b892d53a45fb9c Mon Sep 17 00:00:00 2001 From: SlowRiot Date: Thu, 2 Apr 2026 22:45:01 +0100 Subject: [PATCH] update comment to clarify shutdown conditions --- backends/imgui_impl_emscripten.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/backends/imgui_impl_emscripten.h b/backends/imgui_impl_emscripten.h index 5b23023d5..6814c6f6c 100644 --- a/backends/imgui_impl_emscripten.h +++ b/backends/imgui_impl_emscripten.h @@ -49,7 +49,8 @@ IMGUI_IMPL_API void ImGui_ImplEmscripten_Init(); // Shut down the Emscripten backend. This unsets all Emscripten input callbacks set by Init. // Note it'll also unset any Emscripten input callbacks set elsewhere in the program! -// Note also there is no obligation to ever call this, as there is not necessarily any such concept as "shutting down" when running in the browser, and we have no resources to release. The user can just close the tab. +// Note also there is no obligation to ever call this, unless you intend to reset the backend (i.e. with ImGui::DestroyContext()). +// Otherwise, there is not necessarily any such concept as "shutting down" when running in the browser, and we have no resources to release. The user can just close the tab, so you don't need to worry about exiting cleanly. IMGUI_IMPL_API void ImGui_ImplEmscripten_Shutdown(); // Call every frame to synchronize Dear ImGui's cursor state with the browser's native cursors.