summaryrefslogtreecommitdiffstats
path: root/video
diff options
context:
space:
mode:
authorDudemanguy <random342@airmail.cc>2023-08-15 15:35:28 -0500
committerDudemanguy <random342@airmail.cc>2023-08-15 21:01:13 +0000
commit455487bdc908f7add2163e354b5ac68a33f499b9 (patch)
tree35a89f5455c13008d01c8c4b937433ba486375f7 /video
parent17eb928775a55f155d40a3cc4ccae67eec72edb8 (diff)
downloadmpv-455487bdc908f7add2163e354b5ac68a33f499b9.tar.bz2
mpv-455487bdc908f7add2163e354b5ac68a33f499b9.tar.xz
win32: fix display resolution calculation on mulitple monitors
It was actually always wrong, and no one ever noticed. This currently returns the size of the entire display area and not one actual monitor. Fix this by calling get_monitor_info and then doing the appropriate subtractions. Checked by @CrendKing and fixes #12172.
Diffstat (limited to 'video')
-rw-r--r--video/out/w32_common.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/video/out/w32_common.c b/video/out/w32_common.c
index 08843d6378..4da12182a7 100644
--- a/video/out/w32_common.c
+++ b/video/out/w32_common.c
@@ -1848,9 +1848,9 @@ static int gui_thread_control(struct vo_w32_state *w32, int request, void *arg)
*(double*) arg = w32->display_fps;
return VO_TRUE;
case VOCTRL_GET_DISPLAY_RES: ;
- RECT r = get_screen_area(w32);
- ((int *)arg)[0] = r.right;
- ((int *)arg)[1] = r.bottom;
+ RECT monrc = get_monitor_info(w32).rcMonitor;
+ ((int *)arg)[0] = monrc.right - monrc.left;
+ ((int *)arg)[1] = monrc.bottom - monrc.top;
return VO_TRUE;
case VOCTRL_GET_DISPLAY_NAMES:
*(char ***)arg = get_disp_names(w32);