From 63714740312c4887056d80cce1ff6ee267494282 Mon Sep 17 00:00:00 2001 From: omar Date: Mon, 12 Mar 2018 23:11:53 +0100 Subject: [PATCH] Viewport: Removed unnecessary function hoop. --- imgui.cpp | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/imgui.cpp b/imgui.cpp index be244e9a..911457a2 100644 --- a/imgui.cpp +++ b/imgui.cpp @@ -3514,12 +3514,14 @@ static void UpdatePlatformWindows() } } -static void RenderPlatformWindows() +void ImGui::RenderAdditionalViewports() { - // Render ImGuiContext& g = *GImGui; ImVec2 backup_display_pos = g.IO.DisplayPos; ImVec2 backup_display_size = g.IO.DisplaySize; + if (!(g.IO.ConfigFlags & ImGuiConfigFlags_EnableViewports)) + return; + for (int i = 0; i < g.Viewports.Size; i++) { ImGuiViewport* viewport = g.Viewports[i]; @@ -4452,13 +4454,6 @@ void ImGui::Render() #endif } -void ImGui::RenderAdditionalViewports() -{ - ImGuiContext& g = *GImGui; - if (g.IO.ConfigFlags & ImGuiConfigFlags_EnableViewports) - RenderPlatformWindows(); -} - ImGuiViewport* ImGui::FindViewportByID(ImGuiID id) { ImGuiContext& g = *GImGui;