From cde55d4c340e4d721f2a6f78035df68f9dd27f18 Mon Sep 17 00:00:00 2001 From: wm4 Date: Mon, 15 Jul 2013 23:55:19 +0200 Subject: w32_common: don't use aspdat.asp for aspect aspdat.asp is a problem, because it's updated when the VO calls vo_get_src_dst_rects(). Nothing guarantees that the value has been updated when the w32 code accesses it. Instead, use the aspect vo_w32_config() was called with. --- video/out/w32_common.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/video/out/w32_common.c b/video/out/w32_common.c index 9ce0174320..b5aa899333 100644 --- a/video/out/w32_common.c +++ b/video/out/w32_common.c @@ -26,6 +26,7 @@ #include "core/input/keycodes.h" #include "core/input/input.h" #include "core/mp_msg.h" +#include "core/mp_common.h" #include "vo.h" #include "aspect.h" #include "w32_common.h" @@ -158,7 +159,7 @@ static LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam, RECT r = *rc; subtract_window_borders(w32->window, &r); int c_w = r.right - r.left, c_h = r.bottom - r.top; - float aspect = vo->aspdat.asp; + float aspect = w32->o_dwidth / (float) MPMAX(w32->o_dheight, 1); int d_w = c_h * aspect - c_w; int d_h = c_w / aspect - c_h; int d_corners[4] = { d_w, d_h, -d_w, -d_h }; -- cgit v1.2.3