summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJon TURNEY <jon.turney@dronecode.org.uk>2014-07-16 13:44:33 +0100
committerJon TURNEY <jon.turney@dronecode.org.uk>2014-07-25 17:04:24 +0100
commit7af0496878bc049032a9533331f39ecd760b9b79 (patch)
treec8cd760ed4fcc0ed7af826de52f1ec469bc016c8
parent2b3e36c88a4abfce2b4ef62f2a5d66fec025ad98 (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
-rw-r--r--hw/xwin/glx/indirect.c9
1 files changed, 3 insertions, 6 deletions
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)