From 455487bdc908f7add2163e354b5ac68a33f499b9 Mon Sep 17 00:00:00 2001 From: Dudemanguy Date: Tue, 15 Aug 2023 15:35:28 -0500 Subject: 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. --- video/out/w32_common.c | 6 +++--- 1 file 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); -- cgit v1.2.3