winex11: Don't assume just one on-screen pixel format.

This commit is contained in:
Chris Robinson 2007-09-11 13:16:54 -07:00 committed by Alexandre Julliard
parent 6c5b58a44a
commit f825db6d0f
1 changed files with 3 additions and 1 deletions

View File

@ -149,6 +149,7 @@ static int WineGLExtensionListSize;
static WineGLPixelFormat *WineGLPixelFormatList;
static int WineGLPixelFormatListSize = 0;
static int WineGLPixelFormatOnScreenSize = 0;
static void X11DRV_WineGL_LoadExtensions(void);
static BOOL glxRequireVersion(int requiredVersion);
@ -854,6 +855,7 @@ static BOOL init_formats(Display *display, int screen, Visual *visual)
WineGLPixelFormatList[0].render_type = get_render_type_from_fbconfig(display, fbconfig);
WineGLPixelFormatList[0].offscreenOnly = FALSE;
WineGLPixelFormatListSize = 1;
WineGLPixelFormatOnScreenSize = 1;
/* Fill the list with offscreen formats */
for(i=0; i<nCfgs; i++) {
@ -904,7 +906,7 @@ static WineGLPixelFormat* ConvertPixelFormatWGLtoGLX(Display *display, int iPixe
if(AllowOffscreen)
*fmt_count = WineGLPixelFormatListSize;
else
*fmt_count = 1;
*fmt_count = WineGLPixelFormatOnScreenSize;
TRACE("Number of returned pixelformats=%d\n", *fmt_count);