# HG changeset patch # User reimar # Date 1188825506 0 # Node ID 12f2487fb845ac30ce6e2e36dfd94589ed0fecb6 # Parent 20359547f3c30941da8fa45309e1c39c8ac80a1d Fix compilation after patch to remove global vo_hdc diff -r 20359547f3c3 -r 12f2487fb845 libvo/gl_common.c --- a/libvo/gl_common.c Mon Sep 03 08:44:36 2007 +0000 +++ b/libvo/gl_common.c Mon Sep 03 13:18:26 2007 +0000 @@ -1391,7 +1391,7 @@ res = SET_WINDOW_OK; out: - ReleaseDC(windc); + ReleaseDC(win, windc); return res; } @@ -1407,7 +1407,7 @@ void swapGlBuffers() { HDC vo_hdc = GetDC(vo_w32_window); SwapBuffers(vo_hdc); - ReleaseDC(vo_hdc); + ReleaseDC(vo_w32_window, vo_hdc); } #else #ifdef HAVE_LIBDL diff -r 20359547f3c3 -r 12f2487fb845 libvo/vo_gl2.c --- a/libvo/vo_gl2.c Mon Sep 03 08:44:36 2007 +0000 +++ b/libvo/vo_gl2.c Mon Sep 03 13:18:26 2007 +0000 @@ -101,6 +101,7 @@ { #ifdef GL_WIN32 PIXELFORMATDESCRIPTOR pfd; + HDC vo_hdc = GetDC(vo_window); int pf = GetPixelFormat(vo_hdc); if (!DescribePixelFormat(vo_hdc, pf, sizeof pfd, &pfd)) { r_sz = g_sz = b_sz = a_sz = 0; @@ -110,6 +111,7 @@ b_sz = pfd.cBlueBits; a_sz = pfd.cAlphaBits; } + ReleaseDC(vo_window, vo_hdc); #else if (glXGetConfig(mDisplay, gl_vinfo, GLX_RED_SIZE, &r_sz) != 0) r_sz = 0; if (glXGetConfig(mDisplay, gl_vinfo, GLX_GREEN_SIZE, &g_sz) != 0) g_sz = 0; diff -r 20359547f3c3 -r 12f2487fb845 libvo/w32_common.c --- a/libvo/w32_common.c Mon Sep 03 08:44:36 2007 +0000 +++ b/libvo/w32_common.c Mon Sep 03 13:18:26 2007 +0000 @@ -308,7 +308,7 @@ pf = ChoosePixelFormat(vo_hdc, &pfd); if (!pf) { mp_msg(MSGT_VO, MSGL_ERR, "vo: win32: unable to select a valid pixel format!\n"); - ReleaseDC(vo_hdc); + ReleaseDC(vo_window, vo_hdc); return 0; } @@ -316,7 +316,7 @@ mp_msg(MSGT_VO, MSGL_V, "vo: win32: running at %dx%d with depth %d\n", vo_screenwidth, vo_screenheight, vo_depthonscreen); - ReleaseDC(vo_hdc); + ReleaseDC(vo_window, vo_hdc); return 1; }