diff options
Diffstat (limited to 'src/glx')
-rw-r--r-- | src/glx/glxext.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/src/glx/glxext.c b/src/glx/glxext.c index 9ef7ff5f694..9cbe3347723 100644 --- a/src/glx/glxext.c +++ b/src/glx/glxext.c @@ -524,7 +524,17 @@ __glXInitializeVisualConfigFromTags(struct glx_config * config, int count, config->visualSelectGroup = *bp++; break; case GLX_SWAP_METHOD_OML: - config->swapMethod = *bp++; + if (*bp == GLX_SWAP_UNDEFINED_OML || + *bp == GLX_SWAP_COPY_OML || + *bp == GLX_SWAP_EXCHANGE_OML) { + config->swapMethod = *bp++; + } else { + /* X servers with old HW drivers may return any value here, so + * assume GLX_SWAP_METHOD_UNDEFINED. + */ + config->swapMethod = GLX_SWAP_UNDEFINED_OML; + bp++; + } break; #endif case GLX_SAMPLE_BUFFERS_SGIS: |