summaryrefslogtreecommitdiff
path: root/src/ui/window.c
diff options
context:
space:
mode:
authorJaakko Keränen <jaakko.keranen@iki.fi>2021-04-27 10:04:08 +0300
committerJaakko Keränen <jaakko.keranen@iki.fi>2021-04-27 10:04:08 +0300
commit6b5c5ce624178c1b61c9d5b8677d1c7f8ef38286 (patch)
tree0f0b71753e38e1db551d7722fe4e506c190ed5ab /src/ui/window.c
parente9f4073f73b5b8aba9bfa9c930a66cfda568dd5b (diff)
Window: Display DPI is only used to enlarge UI, never shrink
Diffstat (limited to 'src/ui/window.c')
-rw-r--r--src/ui/window.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/src/ui/window.c b/src/ui/window.c
index 086ab86e..10c7fc82 100644
--- a/src/ui/window.c
+++ b/src/ui/window.c
@@ -1392,10 +1392,7 @@ static float displayScale_Window_(const iWindow *d) {
1392 SDL_GetDisplayDPI(SDL_GetWindowDisplayIndex(d->win), NULL, NULL, &vdpi); 1392 SDL_GetDisplayDPI(SDL_GetWindowDisplayIndex(d->win), NULL, NULL, &vdpi);
1393// printf("DPI: %f\n", vdpi); 1393// printf("DPI: %f\n", vdpi);
1394 const float factor = vdpi / baseDPI_Window / pixelRatio_Window_(d); 1394 const float factor = vdpi / baseDPI_Window / pixelRatio_Window_(d);
1395 if (factor < 0.5f) { 1395 return iMax(1.0f, factor);
1396 return 1.0f; /* seems invalid */
1397 }
1398 return iMax(0.75f, factor);
1399#endif 1396#endif
1400} 1397}
1401 1398