diff options
author | Uoti Urpala <uau@symbol.nonexistent.invalid> | 2008-04-21 01:44:53 +0300 |
---|---|---|
committer | Uoti Urpala <uau@symbol.nonexistent.invalid> | 2008-04-23 13:46:40 +0300 |
commit | a2212a71a74718d71673336a6b08b11f6cf1535b (patch) | |
tree | f76460a6e4c662cb56b7ffece75e40834241684d /libvo/w32_common.c | |
parent | ce76dfdd4ac46e955cc57c6f5c7ae98d8018abab (diff) | |
download | mpv-a2212a71a74718d71673336a6b08b11f6cf1535b.tar.bz2 mpv-a2212a71a74718d71673336a6b08b11f6cf1535b.tar.xz |
Remove vo_depthonscreen references from non-X VOs
X-specific code uses this global as its internal variable (assuming
that X is initialized if it is set). While using non-X VOs the
variable is not accessed outside the VO. So make those VOs use their
own variables instead of the global vo_depthonscreen.
Diffstat (limited to 'libvo/w32_common.c')
-rw-r--r-- | libvo/w32_common.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/libvo/w32_common.c b/libvo/w32_common.c index 8fdfc1da24..82cd9c94a1 100644 --- a/libvo/w32_common.c +++ b/libvo/w32_common.c @@ -23,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; @@ -233,7 +234,7 @@ static void updateScreenProperties(void) { vo_screenwidth = dm.dmPelsWidth; vo_screenheight = dm.dmPelsHeight; - vo_depthonscreen = dm.dmBitsPerPel; + depthonscreen = dm.dmBitsPerPel; w32_update_xinerama_info(); } @@ -243,7 +244,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; @@ -253,7 +254,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; @@ -343,7 +344,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; @@ -442,7 +443,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); |