aboutsummaryrefslogtreecommitdiffstats
path: root/src/glx
diff options
context:
space:
mode:
authorEmil Velikov <[email protected]>2018-12-11 16:20:40 +0000
committerEmil Velikov <[email protected]>2018-12-13 17:38:19 +0000
commita95ec13879d4f04d01fc04a62503578e85c846a8 (patch)
tree79517d0c97196a2bddf9ed5bbb662a4ca424bc26 /src/glx
parentc7bdcd67aaa39338440fcfee6d679919411feb08 (diff)
glx: mandate xf86vidmode only for "drm" dri platforms
Currently we have the three dri "platforms" - drm, apple and windows. Since xf86vidmode is a thing only for the drm one, adjust the preprocessor guards and correctly check for the dependency. v2: terminate the GLX_USE_WINDOWSGL hunk Cc: Jon TURNEY <[email protected]> Fixes: 5bc509363b6 ("glx: make xf86vidmode mandatory for direct rendering") Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Dylan Baker <[email protected]> Acked-by: Eric Engestrom <[email protected]>
Diffstat (limited to 'src/glx')
-rw-r--r--src/glx/glxcmds.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/glx/glxcmds.c b/src/glx/glxcmds.c
index b940c8ebdbe..d00c0d4816d 100644
--- a/src/glx/glxcmds.c
+++ b/src/glx/glxcmds.c
@@ -45,8 +45,10 @@
#include "apple/apple_glx.h"
#include "util/debug.h"
#else
+#ifndef GLX_USE_WINDOWSGL
#include <sys/time.h>
#include <X11/extensions/xf86vmode.h>
+#endif /* GLX_USE_WINDOWSGL */
#endif
#endif
@@ -2081,7 +2083,7 @@ __glXGetSyncValuesOML(Display * dpy, GLXDrawable drawable,
return False;
}
-#if defined(GLX_DIRECT_RENDERING) && !defined(GLX_USE_APPLEGL)
+#if defined(GLX_DIRECT_RENDERING) && !defined(GLX_USE_APPLEGL) && !defined(GLX_USE_WINDOWSGL)
_X_HIDDEN GLboolean
__glxGetMscRate(struct glx_screen *psc,
int32_t * numerator, int32_t * denominator)
@@ -2157,7 +2159,7 @@ _X_HIDDEN GLboolean
__glXGetMscRateOML(Display * dpy, GLXDrawable drawable,
int32_t * numerator, int32_t * denominator)
{
-#if defined(GLX_DIRECT_RENDERING) && !defined(GLX_USE_APPLEGL)
+#if defined(GLX_DIRECT_RENDERING) && !defined(GLX_USE_APPLEGL) && !defined(GLX_USE_WINDOWSGL)
__GLXDRIdrawable *draw = GetGLXDRIDrawable(dpy, drawable);
if (draw == NULL)