diff src/video/x11/SDL_x11sym.h @ 2763:6fc50bdd88c0

Some cleanups on the new XInput code. One or two things got moved around, but largely this is hooked up correctly in the Unix configure system now: it can be dynamically loaded and fallback gracefully if not available, or libXi can be directly linked to libSDL. XInput support can be --disable'd from the configure script, too (defaults to enabled). Please note that while the framework is in place to gracefully fallback, the current state of the source requires XInput. We'll need to adjust a few things still to correct this.
author Ryan C. Gordon <icculus@icculus.org>
date Wed, 17 Sep 2008 08:20:57 +0000
parents 44e49d3fa6cf
children 27cb878a278e
line wrap: on
line diff
--- a/src/video/x11/SDL_x11sym.h	Mon Sep 15 20:48:51 2008 +0000
+++ b/src/video/x11/SDL_x11sym.h	Wed Sep 17 08:20:57 2008 +0000
@@ -144,11 +144,6 @@
 SDL_X11_SYM(SDL_X11_XESetEventToWireRetType,XESetEventToWire,(Display* a,int b,SDL_X11_XESetEventToWireRetType c),(a,b,c),return)
 SDL_X11_SYM(XExtensionErrorHandler,XSetExtensionErrorHandler,(XExtensionErrorHandler a),(a),return)
 
-/*SDL_X11_SYM(XDeviceInfo* , XListInputDevices, (Display* a, int* b), (a,b),return)
-SDL_X11_SYM(void, XFreeDeviceList, (XDeviceInfo* a), (a),)
-SDL_X11_SYM(int, XSelectExtensionEvent,(Display* a, Window b, XEventClass* c, int d),(a,b,c,d),return)
-SDL_X11_SYM(XDevice* ,XOpenDevice,(Display* a, XID b), (a,b),return)*/
-
 #if NeedWidePrototypes
 SDL_X11_SYM(KeySym,XKeycodeToKeysym,(Display* a,unsigned int b,int c),(a,b,c),return)
 #else
@@ -218,6 +213,15 @@
 SDL_X11_SYM(Status,DPMSDisable,(Display *dpy),(dpy),return)
 #endif
 
+/* XInput support for multiple mice, tablets, etc. */
+#if SDL_VIDEO_DRIVER_X11_XINPUT
+SDL_X11_MODULE(XINPUT)
+SDL_X11_SYM(XDeviceInfo*,XListInputDevices,(Display *a,int *b),(a,b),return)
+SDL_X11_SYM(void,XFreeDeviceList,(XDeviceInfo *a),(a),)
+SDL_X11_SYM(int,XSelectExtensionEvent,(Display *a,Window b,XEventClass *c,int d),(a,b,c,d),return)
+SDL_X11_SYM(XDevice*,XOpenDevice,(Display *a,XID b),(a,b),return)
+#endif
+
 /* *INDENT-ON* */
 
 /* vi: set ts=4 sw=4 expandtab: */