win32: support the property display-hidpi-scale

This read-only property reflects the VO's dpi-scale value, and wasn't
supported on win32 until now (it is supported on wayland/x11/osx).

Currently in mpv it's only used by the builtin script console.lua,
and assumed 1 if unavailable.
This commit is contained in:
Avi Halachmi (:avih) 2021-08-09 20:40:53 +03:00 committed by avih
parent 052220d1c7
commit 6193f723b0
1 changed files with 4 additions and 0 deletions

View File

@ -1720,6 +1720,10 @@ static int gui_thread_control(struct vo_w32_state *w32, int request, void *arg)
return VO_TRUE; return VO_TRUE;
} }
case VOCTRL_GET_HIDPI_SCALE: {
*(double *)arg = w32->dpi_scale;
return VO_TRUE;
}
case VOCTRL_GET_UNFS_WINDOW_SIZE: { case VOCTRL_GET_UNFS_WINDOW_SIZE: {
int *s = arg; int *s = arg;