summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJaakko Keränen <jaakko.keranen@iki.fi>2021-04-07 08:36:15 +0300
committerJaakko Keränen <jaakko.keranen@iki.fi>2021-04-07 08:36:15 +0300
commitdb64270782a53463a74e019127a3925e78fd96cd (patch)
tree828feb511c649bc02f153f838bb6c36e20dfa234 /src
parente2f05937ad8e49e8cdb553bd1e6110f4cb0a71e4 (diff)
Window: Adjusted minimum display scaling
Diffstat (limited to 'src')
-rw-r--r--src/ui/window.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/ui/window.c b/src/ui/window.c
index 88ede747..82fb8613 100644
--- a/src/ui/window.c
+++ b/src/ui/window.c
@@ -1295,8 +1295,9 @@ static float displayScale_Window_(const iWindow *d) {
1295#else 1295#else
1296 float vdpi = 0.0f; 1296 float vdpi = 0.0f;
1297 SDL_GetDisplayDPI(SDL_GetWindowDisplayIndex(d->win), NULL, NULL, &vdpi); 1297 SDL_GetDisplayDPI(SDL_GetWindowDisplayIndex(d->win), NULL, NULL, &vdpi);
1298// printf("DPI: %f\n", vdpi);
1298 const float factor = vdpi / baseDPI_Window / pixelRatio_Window_(d); 1299 const float factor = vdpi / baseDPI_Window / pixelRatio_Window_(d);
1299 if (factor < 0.75f) { 1300 if (factor < 0.5f) {
1300 return 1.0f; /* seems invalid */ 1301 return 1.0f; /* seems invalid */
1301 } 1302 }
1302 return iMax(0.75f, factor); 1303 return iMax(0.75f, factor);