summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2019-12-16 21:45:46 +0100
committerwm4 <wm4@nowhere>2019-12-16 21:45:46 +0100
commit65e9139764ec5192b4d7d31758a07e4e16933d0c (patch)
tree88a5228c7f9fee8e85837516d511662583eb9a73
parent5d9aa72f25a1193f6406d8ecda92c8a2142923ef (diff)
downloadmpv-65e9139764ec5192b4d7d31758a07e4e16933d0c.tar.bz2
mpv-65e9139764ec5192b4d7d31758a07e4e16933d0c.tar.xz
x11: fix --hidpi-window-scale=no on hidpi screens
In this combination, the [current-]window-scale properties still incorrectly applied scaling. For some reason, vo_calc_window_geometry2() handled this option (basically ignored the dpi_scale parameter passed to it), but since the DPI compensation for window-scale is implemented in x11_common.c, we need to check and honor this option here too. (What a mess.)
-rw-r--r--video/out/x11_common.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/video/out/x11_common.c b/video/out/x11_common.c
index 09248ddfd0..92dbfc2aa3 100644
--- a/video/out/x11_common.c
+++ b/video/out/x11_common.c
@@ -623,7 +623,7 @@ int vo_x11_init(struct vo *vo)
double dpi_x = x11->ws_width * 25.4 / w_mm;
double dpi_y = x11->ws_height * 25.4 / h_mm;
double base_dpi = 96;
- if (isfinite(dpi_x) && isfinite(dpi_y)) {
+ if (isfinite(dpi_x) && isfinite(dpi_y) && x11->opts->hidpi_window_scale) {
int s_x = lrint(MPCLAMP(dpi_x / base_dpi, 0, 10));
int s_y = lrint(MPCLAMP(dpi_y / base_dpi, 0, 10));
if (s_x == s_y && s_x > 1 && s_x < 10) {