Procházet zdrojové kódy

Viewport: Fixed 32380a0 (#2876)

omar před 5 roky
rodič
revize
6024051a2f
1 změnil soubory, kde provedl 1 přidání a 1 odebrání
  1. 1 1
      imgui.cpp

+ 1 - 1
imgui.cpp

@@ -10252,7 +10252,7 @@ void ImGui::SetCurrentViewport(ImGuiWindow* current_window, ImGuiViewportP* view
         viewport->LastFrameActive = g.FrameCount;
     if (g.CurrentViewport == viewport)
         return;
-    g.CurrentDpiScale = viewport->DpiScale;
+    g.CurrentDpiScale = viewport ? viewport->DpiScale : 1.0f;
     g.CurrentViewport = viewport;
     //IMGUI_DEBUG_LOG_VIEWPORT("SetCurrentViewport changed '%s' 0x%08X\n", current_window ? current_window->Name : NULL, viewport ? viewport->ID : 0);