[MPlayer-cvslog] r24335 - in trunk/libvo: gl_common.c vo_gl2.c w32_common.c
reimar
subversion at mplayerhq.hu
Mon Sep 3 15:18:26 CEST 2007
Author: reimar
Date: Mon Sep 3 15:18:26 2007
New Revision: 24335
Log:
Fix compilation after patch to remove global vo_hdc
Modified:
trunk/libvo/gl_common.c
trunk/libvo/vo_gl2.c
trunk/libvo/w32_common.c
Modified: trunk/libvo/gl_common.c
==============================================================================
--- trunk/libvo/gl_common.c (original)
+++ trunk/libvo/gl_common.c Mon Sep 3 15:18:26 2007
@@ -1391,7 +1391,7 @@ int setGlWindow(int *vinfo, HGLRC *conte
res = SET_WINDOW_OK;
out:
- ReleaseDC(windc);
+ ReleaseDC(win, windc);
return res;
}
@@ -1407,7 +1407,7 @@ void releaseGlContext(int *vinfo, HGLRC
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
Modified: trunk/libvo/vo_gl2.c
==============================================================================
--- trunk/libvo/vo_gl2.c (original)
+++ trunk/libvo/vo_gl2.c Mon Sep 3 15:18:26 2007
@@ -101,6 +101,7 @@ static GLint getInternalFormat(void)
{
#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 @@ static GLint getInternalFormat(void)
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;
Modified: trunk/libvo/w32_common.c
==============================================================================
--- trunk/libvo/w32_common.c (original)
+++ trunk/libvo/w32_common.c Mon Sep 3 15:18:26 2007
@@ -308,7 +308,7 @@ static int createRenderingContext(void)
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 @@ static int createRenderingContext(void)
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;
}
More information about the MPlayer-cvslog
mailing list