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

This commit is contained in:
Brandon 2018-10-18 01:48:18 -07:00 committed by omar
parent 69db792bf0
commit 5f79a28a07

View File

@ -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);