From f879f69f9801be463ab3c160e991ae50c738fc58 Mon Sep 17 00:00:00 2001 From: Roderick Colenbrander Date: Fri, 10 Aug 2007 15:35:02 +0200 Subject: [PATCH] wgl: Make sure onscreen pixelformats are on top in wglChoosePixelFormatARB. --- dlls/winex11.drv/opengl.c | 44 +++++++++++++++++++++++---------------- 1 file changed, 26 insertions(+), 18 deletions(-) diff --git a/dlls/winex11.drv/opengl.c b/dlls/winex11.drv/opengl.c index 7ee99b16cee..ca379d07330 100644 --- a/dlls/winex11.drv/opengl.c +++ b/dlls/winex11.drv/opengl.c @@ -984,7 +984,7 @@ static WineGLPixelFormat* ConvertPixelFormatWGLtoGLX(Display *display, int iPixe } /* Search our internal pixelformat list for the WGL format corresponding to the given fbconfig */ -static int ConvertPixelFormatGLXtoWGL(Display *display, int fmt_id) +static WineGLPixelFormat* ConvertPixelFormatGLXtoWGL(Display *display, int fmt_id) { int i; @@ -995,11 +995,11 @@ static int ConvertPixelFormatGLXtoWGL(Display *display, int fmt_id) for(i=0; ioffscreenOnly) || ((run == 1) && !fmt->offscreenOnly) ) + continue; + + if(pfmt_it < nMaxFormats) { + piFormats[pfmt_it] = fmt->iPixelFormat; + TRACE("at %d/%d found FBCONFIG_ID 0x%x (%d)\n", it + 1, nCfgs, fmt_id, piFormats[pfmt_it]); + } + pfmt_it++; } - pfmt_it++; } *nNumFormats = pfmt_it;