From 7d8c31075b09a3c0fcb483cabc3b22f5fdf87290 Mon Sep 17 00:00:00 2001 From: Roderick Colenbrander Date: Fri, 27 Jul 2007 14:59:01 +0200 Subject: [PATCH] wgl: Fix a BadMatch error resulting from ignoring that iPixelFormat stars counting from 1. --- dlls/winex11.drv/opengl.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dlls/winex11.drv/opengl.c b/dlls/winex11.drv/opengl.c index d6202e53c8f..05f322e9ddc 100644 --- a/dlls/winex11.drv/opengl.c +++ b/dlls/winex11.drv/opengl.c @@ -919,8 +919,8 @@ static BOOL init_formats(Display *display, int screen, Visual *visual) /* We have found an offscreen rendering format :) */ if(tmp_vis_id == 0) { - TRACE("Found offscreen format FBCONFIG_ID 0x%x corresponding to iPixelFormat %d at GLX index %d\n", tmp_fmt_id, WineGLPixelFormatListSize, i); - WineGLPixelFormatList[WineGLPixelFormatListSize].iPixelFormat = WineGLPixelFormatListSize; + TRACE("Found offscreen format FBCONFIG_ID 0x%x corresponding to iPixelFormat %d at GLX index %d\n", tmp_fmt_id, WineGLPixelFormatListSize+1, i); + WineGLPixelFormatList[WineGLPixelFormatListSize].iPixelFormat = WineGLPixelFormatListSize+1; /* The index starts at 1 */ WineGLPixelFormatList[WineGLPixelFormatListSize].fbconfig = cfgs[i]; WineGLPixelFormatList[WineGLPixelFormatListSize].fmt_id = tmp_fmt_id; WineGLPixelFormatList[WineGLPixelFormatListSize].offscreenOnly = TRUE;