summaryrefslogtreecommitdiffstats
path: root/video/out/win_state.h
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2017-01-19 16:30:38 +0100
committerwm4 <wm4@nowhere>2017-01-19 16:31:54 +0100
commita35a5bb5f3c67f867ac6a21cad479657085f0230 (patch)
tree5d61617c9be2994edfbfeabf1926e689e4df9b2b /video/out/win_state.h
parent4adfde5dd1e67775228a345cea00ea03ba6bc68f (diff)
downloadmpv-a35a5bb5f3c67f867ac6a21cad479657085f0230.tar.bz2
mpv-a35a5bb5f3c67f867ac6a21cad479657085f0230.tar.xz
x11: pseudo HiDPI scaling
Scale the window by the assumed DPI scaling factor, using 96 DPI as base. For example, a screen that reports 192 DPI is assumed to have a DPI scale factor 2. The window will then be created with twice the size. For robustness reasons, we accept only integer DPI scales between 1 and 9. We also error out if the X and Y scales are very different, as this most likely indicates a multiscreen system with botched size reporting. I'm not sure if reading the X server's DPI is such a good idea - maybe the Xrdb "Xft.dpi" value should be used instead. The current method follows what xdpyinfo does. This can be disabled with --hidpi-window-scale=no.
Diffstat (limited to 'video/out/win_state.h')
-rw-r--r--video/out/win_state.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/video/out/win_state.h b/video/out/win_state.h
index 6c3988b42b..d495377bac 100644
--- a/video/out/win_state.h
+++ b/video/out/win_state.h
@@ -25,6 +25,8 @@ struct vo_win_geometry {
void vo_calc_window_geometry(struct vo *vo, const struct mp_rect *screen,
struct vo_win_geometry *out_geo);
+void vo_calc_window_geometry2(struct vo *vo, const struct mp_rect *screen,
+ double dpi_scale, struct vo_win_geometry *out_geo);
void vo_apply_window_geometry(struct vo *vo, const struct vo_win_geometry *geo);
#endif