summaryrefslogtreecommitdiff
path: root/platform/x11
diff options
context:
space:
mode:
authorqarmin <mikrutrafal54@gmail.com>2019-04-08 11:03:37 +0200
committerqarmin <mikrutrafal54@gmail.com>2019-04-08 11:03:37 +0200
commit856a8226a5306632f5dd4d9e9c916d89e3e21495 (patch)
treef5ed5052dfc9d6793b78b2353ba84732676beb08 /platform/x11
parentc2c11fc063e723c41579e6307e40fd16ac5334c4 (diff)
Small fixes, mostly dupicated 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 0fe91f3d00..ff532cba77 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