comparison libvo/vo_gl_tiled.c @ 36222:5bff1fc3e7e5

vo_gl_tiled: ensure variables are always initialized. This applies in particular if the backend isn't X11 or W32.
author reimar
date Sun, 09 Jun 2013 18:33:24 +0000
parents e597260febad
children
comparison
equal deleted inserted replaced
36221:e597260febad 36222:5bff1fc3e7e5
100 GLfloat fx, fy, fw, fh; 100 GLfloat fx, fy, fw, fh;
101 }; 101 };
102 102
103 static GLint getInternalFormat(void) 103 static GLint getInternalFormat(void)
104 { 104 {
105 r_sz = g_sz = b_sz = a_sz = 0;
105 switch (glctx.type) { 106 switch (glctx.type) {
106 #ifdef CONFIG_GL_WIN32 107 #ifdef CONFIG_GL_WIN32
107 case GLTYPE_W32: 108 case GLTYPE_W32:
108 { 109 {
109 PIXELFORMATDESCRIPTOR pfd; 110 PIXELFORMATDESCRIPTOR pfd;
110 HDC vo_hdc = vo_w32_get_dc(vo_w32_window); 111 HDC vo_hdc = vo_w32_get_dc(vo_w32_window);
111 int pf = GetPixelFormat(vo_hdc); 112 int pf = GetPixelFormat(vo_hdc);
112 if (!DescribePixelFormat(vo_hdc, pf, sizeof pfd, &pfd)) { 113 if (DescribePixelFormat(vo_hdc, pf, sizeof pfd, &pfd)) {
113 r_sz = g_sz = b_sz = a_sz = 0;
114 } else {
115 r_sz = pfd.cRedBits; 114 r_sz = pfd.cRedBits;
116 g_sz = pfd.cGreenBits; 115 g_sz = pfd.cGreenBits;
117 b_sz = pfd.cBlueBits; 116 b_sz = pfd.cBlueBits;
118 a_sz = pfd.cAlphaBits; 117 a_sz = pfd.cAlphaBits;
119 } 118 }