Made XInput2 optional at compile-time.

This is required for RHEL 5, CentOS 5 and Cygwin-X.

Fixes #314.
This commit is contained in:
Camilla Berglund
2015-01-27 23:48:29 +01:00
parent 93855ae6ab
commit f4c127f75a
7 changed files with 40 additions and 22 deletions
+16 -12
View File
@@ -43,15 +43,17 @@
// The XRandR extension provides mode setting and gamma control
#include <X11/extensions/Xrandr.h>
// The XInput2 extension provides improved input events
#include <X11/extensions/XInput2.h>
// The Xkb extension provides improved keyboard support
#include <X11/XKBlib.h>
// The Xinerama extension provides legacy monitor indices
#include <X11/extensions/Xinerama.h>
#if defined(_GLFW_HAS_XINPUT)
// The XInput2 extension provides improved input events
#include <X11/extensions/XInput2.h>
#endif
#include "posix_tls.h"
#if defined(_GLFW_GLX)
@@ -188,15 +190,6 @@ typedef struct _GLFWlibraryX11
int versionMinor;
} xkb;
struct {
GLboolean available;
int majorOpcode;
int eventBase;
int errorBase;
int versionMajor;
int versionMinor;
} xi;
struct {
int count;
int timeout;
@@ -215,6 +208,17 @@ typedef struct _GLFWlibraryX11
int versionMinor;
} xinerama;
#if defined(_GLFW_HAS_XINPUT)
struct {
GLboolean available;
int majorOpcode;
int eventBase;
int errorBase;
int versionMajor;
int versionMinor;
} xi;
#endif /*_GLFW_HAS_XINPUT*/
} _GLFWlibraryX11;