From 7af0496878bc049032a9533331f39ecd760b9b79 Mon Sep 17 00:00:00 2001 From: Jon TURNEY Date: Wed, 16 Jul 2014 13:44:33 +0100 Subject: hw/xwin/glx: Fix a couple of typo bugs in indirect.c fbConfigToPixelFormatIndex() 's drawableTypeOverride parameter is a drawable type bitmask, not a drawable type enum value WGL_SWAP_COPY_ARB is a value of the WGL_SWAP_METHOD_ARB attribute for wglChoosePixelFormatARB(), not an attribute itself also remove duplicate error reporting for wglChoosePixelFormat --- hw/xwin/glx/indirect.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'hw') diff --git a/hw/xwin/glx/indirect.c b/hw/xwin/glx/indirect.c index b1cb4af6c..c168d2191 100644 --- a/hw/xwin/glx/indirect.c +++ b/hw/xwin/glx/indirect.c @@ -1135,7 +1135,6 @@ glxWinSetPixelFormat(__GLXWinContext * gc, HDC hdc, int bppOverride, fbConfigToPixelFormatIndex(hdc, gc->base.config, drawableTypeOverride, winScreen); if (pixelFormat == 0) { - ErrorF("wglChoosePixelFormat error: %s\n", glxWinErrorMessage()); return FALSE; } @@ -1318,7 +1317,7 @@ glxWinDeferredCreateContext(__GLXWinContext * gc, __GLXWinDrawable * draw) glxWinScreen *winScreen; int pixelFormat; - // XXX: which DC are supposed to use??? + // XXX: which DC are we supposed to use??? HDC screenDC = GetDC(NULL); if (!(gc->base.config->drawableType & GLX_PBUFFER_BIT)) { @@ -1331,10 +1330,8 @@ glxWinDeferredCreateContext(__GLXWinContext * gc, __GLXWinDrawable * draw) pixelFormat = fbConfigToPixelFormatIndex(screenDC, gc->base.config, - GLX_DRAWABLE_PBUFFER, winScreen); + GLX_PBUFFER_BIT, winScreen); if (pixelFormat == 0) { - ErrorF("wglChoosePixelFormat error: %s\n", - glxWinErrorMessage()); return; } @@ -1773,7 +1770,7 @@ fbConfigToPixelFormatIndex(HDC hdc, __GLXconfig * mode, SET_ATTR_VALUE(WGL_SWAP_METHOD_ARB, WGL_SWAP_EXCHANGE_ARB); if (mode->swapMethod == GLX_SWAP_COPY_OML) - SET_ATTR_VALUE(WGL_SWAP_COPY_ARB, TRUE); + SET_ATTR_VALUE(WGL_SWAP_METHOD_ARB, WGL_SWAP_COPY_ARB); // XXX: this should probably be the other way around, but that messes up drawableTypeOverride if (mode->visualRating == GLX_SLOW_VISUAL_EXT) -- cgit v1.2.3