x11: implement hidpi scale reporting

(X11 does not support different per-screen DPI (or only via hacks), so
this is pretty simple. If other backends are going to implement this,
then they should send VO_EVENT_WIN_STATE if the DPI for the mpv window
changes by moving it to another screen or such.)
This commit is contained in:
wm4 2019-12-20 12:48:48 +01:00
parent 8e620c8e76
commit ac474631c1
1 changed files with 3 additions and 0 deletions

View File

@ -1963,6 +1963,9 @@ int vo_x11_control(struct vo *vo, int *events, int request, void *arg)
*(double *)arg = fps;
return VO_TRUE;
}
case VOCTRL_GET_HIDPI_SCALE:
*(double *)arg = x11->dpi_scale;
return VO_TRUE;
}
return VO_NOTIMPL;
}