summaryrefslogtreecommitdiffstats
path: root/libvo/w32_common.c
diff options
context:
space:
mode:
Diffstat (limited to 'libvo/w32_common.c')
-rw-r--r--libvo/w32_common.c18
1 files changed, 10 insertions, 8 deletions
diff --git a/libvo/w32_common.c b/libvo/w32_common.c
index bb420d87c9..3b9cc9ab2b 100644
--- a/libvo/w32_common.c
+++ b/libvo/w32_common.c
@@ -21,6 +21,8 @@
#include <windows.h>
#include <windowsx.h>
+// To get "#define vo_ontop global_vo->opts->vo_ontop" etc
+#include "old_vo_defines.h"
#include "osdep/keycodes.h"
#include "input/input.h"
#include "input/mouse.h"
@@ -37,6 +39,7 @@
static const char classname[] = "MPlayer - The Movie Player";
int vo_vm = 0;
+static int depthonscreen;
// last non-fullscreen extends
static int prev_width;
static int prev_height;
@@ -116,7 +119,7 @@ static LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM l
xborder = (r.right - r.left) - wpos->cx;
yborder = (r.bottom - r.top) - wpos->cy;
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;
@@ -159,7 +162,7 @@ static LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM l
mplayer_put_key(MOUSE_BTN2);
break;
case WM_MOUSEMOVE:
- vo_mouse_movement(GET_X_LPARAM(lParam), GET_Y_LPARAM(lParam));
+ vo_mouse_movement(global_vo, GET_X_LPARAM(lParam), GET_Y_LPARAM(lParam));
break;
case WM_MOUSEWHEEL:
if (!vo_nomouse_input) {
@@ -278,7 +281,7 @@ static void updateScreenProperties(void) {
vo_screenwidth = dm.dmPelsWidth;
vo_screenheight = dm.dmPelsHeight;
- vo_depthonscreen = dm.dmBitsPerPel;
+ depthonscreen = dm.dmBitsPerPel;
w32_update_xinerama_info();
}
@@ -288,7 +291,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;
@@ -298,7 +301,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;
@@ -427,7 +430,6 @@ static char *get_display_name(void) {
*
* Global libvo variables changed:
* vo_w32_window
- * vo_depthonscreen
* vo_screenwidth
* vo_screenheight
*
@@ -511,7 +513,7 @@ int vo_w32_init(void) {
SetPixelFormat(vo_hdc, pf, &pfd);
vo_w32_release_dc(vo_window, vo_hdc);
- 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);
return 1;
}
@@ -577,7 +579,7 @@ void vo_w32_uninit(void) {
mp_msg(MSGT_VO, MSGL_V, "vo: win32: uninit\n");
resetMode();
ShowCursor(1);
- vo_depthonscreen = 0;
+ depthonscreen = 0;
if (dev_hdc) DeleteDC(dev_hdc);
dev_hdc = 0;
DestroyWindow(vo_window);