Mercurial > mplayer.hg
comparison libvo/vo_gl2.c @ 24315:12f2487fb845
Fix compilation after patch to remove global vo_hdc
author | reimar |
---|---|
date | Mon, 03 Sep 2007 13:18:26 +0000 |
parents | 00aa61cde84a |
children | 3aee342be929 |
comparison
equal
deleted
inserted
replaced
24314:20359547f3c3 | 24315:12f2487fb845 |
---|---|
99 | 99 |
100 static GLint getInternalFormat(void) | 100 static GLint getInternalFormat(void) |
101 { | 101 { |
102 #ifdef GL_WIN32 | 102 #ifdef GL_WIN32 |
103 PIXELFORMATDESCRIPTOR pfd; | 103 PIXELFORMATDESCRIPTOR pfd; |
104 HDC vo_hdc = GetDC(vo_window); | |
104 int pf = GetPixelFormat(vo_hdc); | 105 int pf = GetPixelFormat(vo_hdc); |
105 if (!DescribePixelFormat(vo_hdc, pf, sizeof pfd, &pfd)) { | 106 if (!DescribePixelFormat(vo_hdc, pf, sizeof pfd, &pfd)) { |
106 r_sz = g_sz = b_sz = a_sz = 0; | 107 r_sz = g_sz = b_sz = a_sz = 0; |
107 } else { | 108 } else { |
108 r_sz = pfd.cRedBits; | 109 r_sz = pfd.cRedBits; |
109 g_sz = pfd.cGreenBits; | 110 g_sz = pfd.cGreenBits; |
110 b_sz = pfd.cBlueBits; | 111 b_sz = pfd.cBlueBits; |
111 a_sz = pfd.cAlphaBits; | 112 a_sz = pfd.cAlphaBits; |
112 } | 113 } |
114 ReleaseDC(vo_window, vo_hdc); | |
113 #else | 115 #else |
114 if (glXGetConfig(mDisplay, gl_vinfo, GLX_RED_SIZE, &r_sz) != 0) r_sz = 0; | 116 if (glXGetConfig(mDisplay, gl_vinfo, GLX_RED_SIZE, &r_sz) != 0) r_sz = 0; |
115 if (glXGetConfig(mDisplay, gl_vinfo, GLX_GREEN_SIZE, &g_sz) != 0) g_sz = 0; | 117 if (glXGetConfig(mDisplay, gl_vinfo, GLX_GREEN_SIZE, &g_sz) != 0) g_sz = 0; |
116 if (glXGetConfig(mDisplay, gl_vinfo, GLX_BLUE_SIZE, &b_sz) != 0) b_sz = 0; | 118 if (glXGetConfig(mDisplay, gl_vinfo, GLX_BLUE_SIZE, &b_sz) != 0) b_sz = 0; |
117 if (glXGetConfig(mDisplay, gl_vinfo, GLX_ALPHA_SIZE, &a_sz) != 0) a_sz = 0; | 119 if (glXGetConfig(mDisplay, gl_vinfo, GLX_ALPHA_SIZE, &a_sz) != 0) a_sz = 0; |