summaryrefslogtreecommitdiffstats
path: root/src/glx/dri2_glx.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/glx/dri2_glx.c')
-rw-r--r--src/glx/dri2_glx.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/glx/dri2_glx.c b/src/glx/dri2_glx.c
index e00dffeab1b..7d0a8603e05 100644
--- a/src/glx/dri2_glx.c
+++ b/src/glx/dri2_glx.c
@@ -522,7 +522,7 @@ dri2GetBuffersWithFormat(__DRIdrawable * driDrawable,
#ifdef X_DRI2SwapInterval
-static void
+static int
dri2SetSwapInterval(__GLXDRIdrawable *pdraw, int interval)
{
struct dri2_drawable *priv = (struct dri2_drawable *) pdraw;
@@ -535,10 +535,10 @@ dri2SetSwapInterval(__GLXDRIdrawable *pdraw, int interval)
switch (vblank_mode) {
case DRI_CONF_VBLANK_NEVER:
- return;
+ return GLX_BAD_VALUE;
case DRI_CONF_VBLANK_ALWAYS_SYNC:
if (interval <= 0)
- return;
+ return GLX_BAD_VALUE;
break;
default:
break;
@@ -546,6 +546,8 @@ dri2SetSwapInterval(__GLXDRIdrawable *pdraw, int interval)
DRI2SwapInterval(priv->base.psc->dpy, priv->base.xDrawable, interval);
priv->swap_interval = interval;
+
+ return 0;
}
static unsigned int