summaryrefslogtreecommitdiff
path: root/src/ui/window.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/ui/window.c')
-rw-r--r--src/ui/window.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/src/ui/window.c b/src/ui/window.c
index 3bafd9a4..3ac02495 100644
--- a/src/ui/window.c
+++ b/src/ui/window.c
@@ -278,11 +278,14 @@ static float displayScale_Window_(const iWindow *d) {
278 iUnused(d); 278 iUnused(d);
279 return desktopDPI_Win32(); 279 return desktopDPI_Win32();
280#else 280#else
281 float vdpi = 0.0f; 281 if (isRunningUnderWindowSystem_App()) {
282 SDL_GetDisplayDPI(SDL_GetWindowDisplayIndex(d->win), NULL, NULL, &vdpi); 282 float vdpi = 0.0f;
283// printf("DPI: %f\n", vdpi); 283 SDL_GetDisplayDPI(SDL_GetWindowDisplayIndex(d->win), NULL, NULL, &vdpi);
284 const float factor = vdpi / baseDPI_Window / pixelRatio_Window_(d); 284// printf("DPI: %f\n", vdpi);
285 return iMax(1.0f, factor); 285 const float factor = vdpi / baseDPI_Window / pixelRatio_Window_(d);
286 return iMax(1.0f, factor);
287 }
288 return 1.0f;
286#endif 289#endif
287} 290}
288 291