changeset 24315:12f2487fb845

Fix compilation after patch to remove global vo_hdc
author reimar
date Mon, 03 Sep 2007 13:18:26 +0000
parents 20359547f3c3
children 31dbcf68a706
files libvo/gl_common.c libvo/vo_gl2.c libvo/w32_common.c
diffstat 3 files changed, 6 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- 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
--- 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;
--- 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;
 }