Don't call XInput2 multitouch APIs if they aren't supported.
authorRyan C. Gordon <icculus@icculus.org>
Mon, 17 Sep 2012 19:25:42 -0400
changeset 6433 8bbb5ff8788f
parent 6432 de49d33b829e
child 6434 334e7dc89adb
Don't call XInput2 multitouch APIs if they aren't supported. I think it fixes this: http://forums.libsdl.org/viewtopic.php?t=8324&sid=ae797309f9e2084cadc1b6a7615bd0e4
src/video/x11/SDL_x11xinput2.c
--- a/src/video/x11/SDL_x11xinput2.c	Mon Sep 17 19:20:47 2012 -0400
+++ b/src/video/x11/SDL_x11xinput2.c	Mon Sep 17 19:25:42 2012 -0400
@@ -220,6 +220,10 @@
 void 
 X11_Xinput2SelectTouch(_THIS, SDL_Window *window) {
 #if SDL_VIDEO_DRIVER_X11_XINPUT2_SUPPORTS_MULTITOUCH
+    if (!X11_Xinput2IsMultitouchSupported()) {
+        return;
+    }
+
     SDL_VideoData *data = (SDL_VideoData *) _this->driverdata;
     XIEventMask eventmask;
     unsigned char mask[3] = { 0,0,0 };