summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAvi Halachmi (:avih) <avihpit@yahoo.com>2021-08-09 20:40:53 +0300
committeravih <avih@users.noreply.github.com>2021-08-18 02:21:33 +0300
commit6193f723b0aa234bfb5c869d9e2af67b0df0dfef (patch)
treef6fed0bebe5431f872a81de4b8d93f71012da08b
parent052220d1c7774fc700054a69d1e773bd4ec687c1 (diff)
downloadmpv-6193f723b0aa234bfb5c869d9e2af67b0df0dfef.tar.bz2
mpv-6193f723b0aa234bfb5c869d9e2af67b0df0dfef.tar.xz
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.
-rw-r--r--video/out/w32_common.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/video/out/w32_common.c b/video/out/w32_common.c
index c52406de4e..7308371125 100644
--- a/video/out/w32_common.c
+++ b/video/out/w32_common.c
@@ -1720,6 +1720,10 @@ static int gui_thread_control(struct vo_w32_state *w32, int request, void *arg)
return VO_TRUE;
}
+ case VOCTRL_GET_HIDPI_SCALE: {
+ *(double *)arg = w32->dpi_scale;
+ return VO_TRUE;
+ }
case VOCTRL_GET_UNFS_WINDOW_SIZE: {
int *s = arg;