comparison src/video/x11/SDL_x11dyn.c @ 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 c7bcf84ba1b9
children 99210400e8b9
comparison
equal deleted inserted replaced
2762:90de10bc38ec 2763:6fc50bdd88c0
50 #define SDL_VIDEO_DRIVER_X11_DYNAMIC_XRENDER NULL 50 #define SDL_VIDEO_DRIVER_X11_DYNAMIC_XRENDER NULL
51 #endif 51 #endif
52 #ifndef SDL_VIDEO_DRIVER_X11_DYNAMIC_XRANDR 52 #ifndef SDL_VIDEO_DRIVER_X11_DYNAMIC_XRANDR
53 #define SDL_VIDEO_DRIVER_X11_DYNAMIC_XRANDR NULL 53 #define SDL_VIDEO_DRIVER_X11_DYNAMIC_XRANDR NULL
54 #endif 54 #endif
55 #ifndef SDL_VIDEO_DRIVER_X11_DYNAMIC_XINPUT
56 #define SDL_VIDEO_DRIVER_X11_DYNAMIC_XINPUT NULL
57 #endif
55 58
56 static x11dynlib x11libs[] = { 59 static x11dynlib x11libs[] = {
57 {NULL, SDL_VIDEO_DRIVER_X11_DYNAMIC}, 60 {NULL, SDL_VIDEO_DRIVER_X11_DYNAMIC},
58 {NULL, SDL_VIDEO_DRIVER_X11_DYNAMIC_XEXT}, 61 {NULL, SDL_VIDEO_DRIVER_X11_DYNAMIC_XEXT},
59 {NULL, SDL_VIDEO_DRIVER_X11_DYNAMIC_XRENDER}, 62 {NULL, SDL_VIDEO_DRIVER_X11_DYNAMIC_XRENDER},
60 {NULL, SDL_VIDEO_DRIVER_X11_DYNAMIC_XRANDR}, 63 {NULL, SDL_VIDEO_DRIVER_X11_DYNAMIC_XRANDR},
64 {NULL, SDL_VIDEO_DRIVER_X11_DYNAMIC_XINPUT},
61 }; 65 };
62 66
63 static void 67 static void
64 X11_GetSym(const char *fnname, int *rc, void **fn) 68 X11_GetSym(const char *fnname, int *rc, void **fn)
65 { 69 {