diff options
Diffstat (limited to 'libvo/w32_common.c')
-rw-r--r-- | libvo/w32_common.c | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/libvo/w32_common.c b/libvo/w32_common.c index 9062f6898d..fd1fe5c36b 100644 --- a/libvo/w32_common.c +++ b/libvo/w32_common.c @@ -11,6 +11,8 @@ #include "aspect.h" #include "w32_common.h" #include "mp_fifo.h" +// To get "#define vo_ontop global_vo->opts->vo_ontop" etc +#include "old_vo_defines.h" extern int enable_mouse_movements; @@ -21,6 +23,7 @@ extern int enable_mouse_movements; static const char classname[] = "MPlayer - Media player for Win32"; int vo_vm = 0; +static int depthonscreen; // last non-fullscreen extends static int prev_width; static int prev_height; @@ -72,7 +75,7 @@ static LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM l xborder = (r2.right - r2.left) - (r.right - r.left); yborder = (r2.bottom - r2.top) - (r.bottom - r.top); wpos->cx -= xborder; wpos->cy -= yborder; - aspect_fit(&wpos->cx, &wpos->cy, wpos->cx, wpos->cy); + aspect_fit(global_vo, &wpos->cx, &wpos->cy, wpos->cx, wpos->cy); wpos->cx += xborder; wpos->cy += yborder; } return 0; @@ -132,7 +135,7 @@ static LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM l char cmd_str[40]; snprintf(cmd_str, sizeof(cmd_str), "set_mouse_pos %i %i", GET_X_LPARAM(lParam), GET_Y_LPARAM(lParam)); - mp_input_queue_cmd(mp_input_parse_cmd(cmd_str)); + mp_input_queue_cmd(global_vo->input_ctx, mp_input_parse_cmd(cmd_str)); } break; case WM_MOUSEWHEEL: @@ -247,7 +250,7 @@ static void updateScreenProperties(void) { vo_screenwidth = dm.dmPelsWidth; vo_screenheight = dm.dmPelsHeight; - vo_depthonscreen = dm.dmBitsPerPel; + depthonscreen = dm.dmBitsPerPel; w32_update_xinerama_info(); } @@ -257,7 +260,7 @@ static void changeMode(void) { dm.dmDriverExtra = 0; dm.dmFields = DM_BITSPERPEL | DM_PELSWIDTH | DM_PELSHEIGHT; - dm.dmBitsPerPel = vo_depthonscreen; + dm.dmBitsPerPel = depthonscreen; dm.dmPelsWidth = vo_screenwidth; dm.dmPelsHeight = vo_screenheight; @@ -267,7 +270,7 @@ static void changeMode(void) { int i; for (i = 0; EnumDisplaySettings(0, i, &dm); ++i) { int score = (dm.dmPelsWidth - o_dwidth) * (dm.dmPelsHeight - o_dheight); - if (dm.dmBitsPerPel != vo_depthonscreen) continue; + if (dm.dmBitsPerPel != depthonscreen) continue; if (dm.dmPelsWidth < o_dwidth) continue; if (dm.dmPelsHeight < o_dheight) continue; @@ -357,7 +360,7 @@ static int createRenderingContext(void) { SetPixelFormat(vo_hdc, pf, &pfd); - mp_msg(MSGT_VO, MSGL_V, "vo: win32: running at %dx%d with depth %d\n", vo_screenwidth, vo_screenheight, vo_depthonscreen); + mp_msg(MSGT_VO, MSGL_V, "vo: win32: running at %dx%d with depth %d\n", vo_screenwidth, vo_screenheight, depthonscreen); ReleaseDC(vo_window, vo_hdc); return 1; @@ -524,7 +527,7 @@ void vo_w32_uninit(void) { mp_msg(MSGT_VO, MSGL_V, "vo: win32: uninit\n"); resetMode(); ShowCursor(1); - vo_depthonscreen = 0; + depthonscreen = 0; DestroyWindow(vo_window); vo_window = 0; UnregisterClass(classname, 0); |