diff options
author | Jon Turney <jon.turney@dronecode.org.uk> | 2017-01-06 21:36:12 +0000 |
---|---|---|
committer | Jon Turney <jon.turney@dronecode.org.uk> | 2017-01-09 21:13:34 +0000 |
commit | 611a99adbd986c0983d3de519b78283fbdcab529 (patch) | |
tree | 1f587f853b652d0abafb0827c1ecfe57831e9696 | |
parent | 3876fa25317449e95c8b44b0abfda72e91828a7d (diff) |
Fix a warning when WGL_ARB_framebuffer_sRGB isn't available
Fix a bogus warning about a missing pixelformat attribute issued for every
pixelformat when WGL_ARB_framebuffer_sRGB isn't available
-rw-r--r-- | hw/xwin/glx/indirect.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/hw/xwin/glx/indirect.c b/hw/xwin/glx/indirect.c index 6aeabf4c9..33b82eaf7 100644 --- a/hw/xwin/glx/indirect.c +++ b/hw/xwin/glx/indirect.c @@ -2539,7 +2539,10 @@ glxWinCreateConfigsExt(HDC hdc, glxWinScreen * screen, PixelFormatRejectStats * c->base.yInverted = -1; /* WGL_ARB_framebuffer_sRGB */ - c->base.sRGBCapable = ATTR_VALUE(WGL_FRAMEBUFFER_SRGB_CAPABLE_ARB, 0); + if (screen->has_WGL_ARB_framebuffer_sRGB) + c->base.sRGBCapable = ATTR_VALUE(WGL_FRAMEBUFFER_SRGB_CAPABLE_ARB, 0); + else + c->base.sRGBCapable = 0; n++; |