# HG changeset patch # User Jim Grandpre # Date 1280722493 14400 # Node ID 5378f2d0754f6d47cdc629013f80333e7281fc5f # Parent 22952969328912568f793872c4d5d0d0bdd347d4 Fixed some Gesture bugs diff -r 229529693289 -r 5378f2d0754f configure.in --- a/configure.in Sat Jul 31 20:55:33 2010 -0700 +++ b/configure.in Mon Aug 02 00:14:53 2010 -0400 @@ -285,8 +285,6 @@ AC_DEFINE(uintptr_t, unsigned long) fi -AC_CHECK_HEADER(Linux/input.h,AC_DEFINE(HAVE_LINUX_INPUT_H)) - # Standard C sources SOURCES="$SOURCES $srcdir/src/*.c" SOURCES="$SOURCES $srcdir/src/audio/*.c" @@ -1007,6 +1005,8 @@ dnl Find the X11 include and library directories CheckX11() { + + AC_ARG_ENABLE(video-x11, AC_HELP_STRING([--enable-video-x11], [use X11 video driver [[default=yes]]]), , enable_video_x11=yes) diff -r 229529693289 -r 5378f2d0754f src/events/SDL_gesture.c --- a/src/events/SDL_gesture.c Sat Jul 31 20:55:33 2010 -0700 +++ b/src/events/SDL_gesture.c Mon Aug 02 00:14:53 2010 -0400 @@ -27,7 +27,7 @@ #include "SDL_gesture_c.h" //TODO: Replace with malloc -#define MAXFINGERS 3 +#define MAXFINGERS 5 #define MAXTOUCHES 2 #define MAXTEMPLATES 4 #define MAXPATHSIZE 1024 @@ -496,6 +496,7 @@ } } inTouch->gestureLast[j] = inTouch->gestureLast[inTouch->numDownFingers]; + j = -1; break; } else { diff -r 229529693289 -r 5378f2d0754f src/events/SDL_touch.c --- a/src/events/SDL_touch.c Sat Jul 31 20:55:33 2010 -0700 +++ b/src/events/SDL_touch.c Mon Aug 02 00:14:53 2010 -0400 @@ -392,8 +392,7 @@ //scale to Integer coordinates Uint16 x = (xin+touch->x_min)*(touch->xres)/(touch->native_xres); Uint16 y = (yin+touch->y_min)*(touch->yres)/(touch->native_yres); - Uint16 pressure = (yin+touch->pressure_min)*(touch->pressureres)/(touch->native_pressureres); - printf("(%f,%f) --> (%i,%i)\n",xin,yin,x,y); + Uint16 pressure = (yin+touch->pressure_min)*(touch->pressureres)/(touch->native_pressureres); if(touch->flush_motion) { return 0; } diff -r 229529693289 -r 5378f2d0754f src/video/x11/SDL_eventtouch.c --- a/src/video/x11/SDL_eventtouch.c Sat Jul 31 20:55:33 2010 -0700 +++ b/src/video/x11/SDL_eventtouch.c Mon Aug 02 00:14:53 2010 -0400 @@ -24,7 +24,8 @@ #include "SDL_eventtouch.h" #include "../../events/SDL_touch_c.h" -#ifdef HAVE_LINUX_INPUT_H + +#ifdef SDL_INPUT_LINUXEV #include #include #endif @@ -32,7 +33,7 @@ void X11_InitTouch(_THIS) { -#ifdef HAVE_LINUX_INPUT_H +#ifdef SDL_INPUT_LINUXEV printf("Initializing touch...\n"); FILE *fd; diff -r 229529693289 -r 5378f2d0754f src/video/x11/SDL_x11events.c --- a/src/video/x11/SDL_x11events.c Sat Jul 31 20:55:33 2010 -0700 +++ b/src/video/x11/SDL_x11events.c Mon Aug 02 00:14:53 2010 -0400 @@ -37,7 +37,7 @@ #include -#ifdef HAVE_LINUX_INPUT_H +#ifdef SDL_INPUT_LINUXEV //Touch Input/event* includes #include #include @@ -402,7 +402,7 @@ X11_DispatchEvent(_this); } -#ifdef HAVE_LINUX_INPUT_H +#ifdef SDL_INPUT_LINUXEV /* Process Touch events - TODO When X gets touch support, use that instead*/ int i = 0,rd; char name[256]; diff -r 229529693289 -r 5378f2d0754f touchTest/gestureSDLTest.c --- a/touchTest/gestureSDLTest.c Sat Jul 31 20:55:33 2010 -0700 +++ b/touchTest/gestureSDLTest.c Mon Aug 02 00:14:53 2010 -0400 @@ -131,7 +131,7 @@ memcpy(&colour,pixmem32,screen->format->BytesPerPixel); - SDL_GetRGB(colour,screen->format,&r,&g,&b); //Always returns 0xFFFFFF? + SDL_GetRGB(colour,screen->format,&r,&g,&b); //r = 0;g = 0; b = 0; a = (col>>24)&0xFF; if(a == 0) a = 0xFF; //Hack, to make things easier. @@ -400,8 +400,7 @@ break; case SDL_FINGERDOWN: - printf("Finger: %"PRIs64" down - x: %i, y: %i\n",event.tfinger.fingerId, - event.tfinger.x,event.tfinger.y); + //printf("Finger: %"PRIs64" down - x: %i, y: %i\n",event.tfinger.fingerId,event.tfinger.x,event.tfinger.y); for(i = 0;i