summaryrefslogtreecommitdiff
path: root/platform/x11
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2019-04-22 12:00:34 +0200
committerGitHub <noreply@github.com>2019-04-22 12:00:34 +0200
commita342131eba2834240289112a1b8d5d0c68a265c9 (patch)
treec412df9c24c8b568086ea6ff72a097fb8d20dbc0 /platform/x11
parent1e67f214c520b2c1a9fed30f78440c4e1d4d14dd (diff)
parent856a8226a5306632f5dd4d9e9c916d89e3e21495 (diff)
Merge pull request #27673 from qarmin/small_fixes
Small fixes, mostly duplicated code
Diffstat (limited to 'platform/x11')
-rw-r--r--platform/x11/os_x11.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/platform/x11/os_x11.cpp b/platform/x11/os_x11.cpp
index c96047dfbd..ad4bcb283f 100644
--- a/platform/x11/os_x11.cpp
+++ b/platform/x11/os_x11.cpp
@@ -1165,7 +1165,7 @@ int OS_X11::get_screen_dpi(int p_screen) const {
int height_mm = DisplayHeightMM(x11_display, p_screen);
double xdpi = (width_mm ? sc.width / (double)width_mm * 25.4 : 0);
double ydpi = (height_mm ? sc.height / (double)height_mm * 25.4 : 0);
- if (xdpi || xdpi)
+ if (xdpi || ydpi)
return (xdpi + ydpi) / (xdpi && ydpi ? 2 : 1);
//could not get dpi