From 170bcb2d7c247595761bfb07b36755aa6541f4cf Mon Sep 17 00:00:00 2001 From: omar Date: Fri, 29 Dec 2017 20:56:52 +0100 Subject: [PATCH] Internals: NewFrame: Shuffled some code around (to minimize upcoming patches) --- imgui.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/imgui.cpp b/imgui.cpp index 4b8f8aa47..b9ceb11df 100644 --- a/imgui.cpp +++ b/imgui.cpp @@ -2276,15 +2276,16 @@ void ImGui::NewFrame() if (!g.Initialized) Initialize(); + g.Time += g.IO.DeltaTime; + g.FrameCount += 1; + g.TooltipOverrideCount = 0; + g.WindowsActiveCount = 0; + SetCurrentFont(GetDefaultFont()); IM_ASSERT(g.Font->IsLoaded()); g.DrawListSharedData.ClipRectFullscreen = ImVec4(0.0f, 0.0f, g.IO.DisplaySize.x, g.IO.DisplaySize.y); g.DrawListSharedData.CurveTessellationTol = g.Style.CurveTessellationTol; - g.Time += g.IO.DeltaTime; - g.FrameCount += 1; - g.TooltipOverrideCount = 0; - g.WindowsActiveCount = 0; g.OverlayDrawList.Clear(); g.OverlayDrawList.PushTextureID(g.IO.Fonts->TexID); g.OverlayDrawList.PushClipRectFullScreen();