Sfoglia il codice sorgente

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

Brandon 6 anni fa
parent
commit
5f79a28a07
1 ha cambiato i file con 1 aggiunte e 1 eliminazioni
  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
 #endif
 #if SDL_HAS_PER_MONITOR_DPI
 #if SDL_HAS_PER_MONITOR_DPI
         float dpi = 0.0f;
         float dpi = 0.0f;
-        if (SDL_GetDisplayDPI(n, &dpi, NULL, NULL))
+        if (!SDL_GetDisplayDPI(n, &dpi, NULL, NULL))
             monitor.DpiScale = dpi / 96.0f;
             monitor.DpiScale = dpi / 96.0f;
 #endif
 #endif
         platform_io.Monitors.push_back(monitor);
         platform_io.Monitors.push_back(monitor);