diff options
author | Jon TURNEY <jon.turney@dronecode.org.uk> | 2014-07-16 13:44:33 +0100 |
---|---|---|
committer | Jon TURNEY <jon.turney@dronecode.org.uk> | 2014-08-29 13:52:08 +0100 |
commit | 31d089633683ea2a2716651c3c48e1456cc595bf (patch) | |
tree | 308f39820884ddbbff512e019a7419da5e23e94c | |
parent | b1ea714cdce8444c6ad7778dae04e35c6bcc1750 (diff) |
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() and fix a
comment
Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
-rw-r--r-- | hw/xwin/glx/indirect.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/hw/xwin/glx/indirect.c b/hw/xwin/glx/indirect.c index 6c0303322..70b9156cc 100644 --- a/hw/xwin/glx/indirect.c +++ b/hw/xwin/glx/indirect.c @@ -1120,7 +1120,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; } @@ -1303,7 +1302,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)) { @@ -1316,10 +1315,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; } @@ -1758,7 +1755,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) |