0
0
mirror of https://github.com/mpv-player/mpv.git synced 2024-09-20 12:02:23 +02:00

Fix compilation after patch to remove global vo_hdc

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@24335 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
reimar 2007-09-03 13:18:26 +00:00
parent e1e588421f
commit 7b9f20c0ab
3 changed files with 6 additions and 4 deletions

View File

@ -1391,7 +1391,7 @@ int setGlWindow(int *vinfo, HGLRC *context, HWND win)
res = SET_WINDOW_OK;
out:
ReleaseDC(windc);
ReleaseDC(win, windc);
return res;
}
@ -1407,7 +1407,7 @@ void releaseGlContext(int *vinfo, HGLRC *context) {
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

View File

@ -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;

View File

@ -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;
}