glx: Allow glXSwapInterval(0) when vblank_mode=0.
authorEric Anholt <eric@anholt.net>
Thu, 4 Oct 2012 20:42:16 +0000 (13:42 -0700)
committerEric Anholt <eric@anholt.net>
Tue, 9 Oct 2012 21:32:03 +0000 (14:32 -0700)
There's no reason to say no in this case.

src/glx/dri2_glx.c

index 18542d182016f37ba3ff38bb72b30b5bc443bbc8..07a3384d0abe1f3eae78bed8dbf99ee933ecf0c0 100644 (file)
@@ -830,7 +830,9 @@ dri2SetSwapInterval(__GLXDRIdrawable *pdraw, int interval)
 
    switch (vblank_mode) {
    case DRI_CONF_VBLANK_NEVER:
-      return GLX_BAD_VALUE;
+      if (interval != 0)
+         return GLX_BAD_VALUE;
+      break;
    case DRI_CONF_VBLANK_ALWAYS_SYNC:
       if (interval <= 0)
         return GLX_BAD_VALUE;