Commit 233f70b5 authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

GLX: glXSwapIntervalEXT() returns void so ignore return value

glXSwapIntervalEXT() does not return a value, contrary to the
SGI equivalent. In case of error, the X11 error handler is used.

This patch fixes compilation with conforming headers. It should still
be compatible with buggy Mesa headers where 'int' is returned.

For reference, see the specification here:
http://www.opengl.org/registry/specs/EXT/swap_control.txt
http://www.opengl.org/registry/api/glxext.h
(cherry picked from commit 9cf66c2856ab3a209fe15ec5662a8cd927ee20bc)
parent f432547b
......@@ -381,7 +381,10 @@ static int Open (vlc_object_t *obj)
if (HasExtension (glx_extensions, "GLX_EXT_swap_control")) {
PFNGLXSWAPINTERVALEXTPROC SwapIntervalEXT = (PFNGLXSWAPINTERVALEXTPROC)GetProcAddress (NULL, "glXSwapIntervalEXT");
if (!is_swap_interval_set && SwapIntervalEXT)
is_swap_interval_set = !SwapIntervalEXT (dpy, sys->glwin, 1);
{
SwapIntervalEXT (dpy, sys->glwin, 1);
is_swap_interval_set = true;
}
}
#endif
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment