IO: added ImGuiPlatformIO::ClearPlatformHandlers(), ClearRendererHandlers(). Backends: call those on Shutdown(). (#8945, #2769)

This commit is contained in:
ocornut
2025-09-18 16:22:24 +02:00
parent 0e7cd694eb
commit d4f722d5b2
21 changed files with 95 additions and 2 deletions

View File

@@ -15453,6 +15453,23 @@ void ImGui::LocalizeRegisterEntries(const ImGuiLocEntry* entries, int count)
// (this section is more complete in the 'docking' branch)
//-----------------------------------------------------------------------------
void ImGuiPlatformIO::ClearPlatformHandlers()
{
Platform_GetClipboardTextFn = NULL;
Platform_SetClipboardTextFn = NULL;
Platform_ClipboardUserData = NULL;
Platform_OpenInShellFn = NULL;
Platform_OpenInShellUserData = NULL;
Platform_SetImeDataFn = NULL;
Platform_ImeUserData = NULL;
}
void ImGuiPlatformIO::ClearRendererHandlers()
{
Renderer_TextureMaxWidth = Renderer_TextureMaxHeight = 0;
Renderer_RenderState = NULL;
}
ImGuiViewport* ImGui::GetMainViewport()
{
ImGuiContext& g = *GImGui;