Kaynağa Gözat

Examples: SDL: Fixed usage of SDL_GetDisplayDPI (#2137, #1676)

Brandon 6 yıl önce
ebeveyn
işleme
5f79a28a07
1 değiştirilmiş dosya ile 1 ekleme ve 1 silme
  1. 1 1
      examples/imgui_impl_sdl.cpp

+ 1 - 1
examples/imgui_impl_sdl.cpp

@@ -523,7 +523,7 @@ static void ImGui_ImplSDL2_UpdateMonitors()
 #endif
 #if SDL_HAS_PER_MONITOR_DPI
         float dpi = 0.0f;
-        if (SDL_GetDisplayDPI(n, &dpi, NULL, NULL))
+        if (!SDL_GetDisplayDPI(n, &dpi, NULL, NULL))
             monitor.DpiScale = dpi / 96.0f;
 #endif
         platform_io.Monitors.push_back(monitor);