touchTest/gestureSDLTest.c
changeset 4676 99b4560b7aa1
parent 4664 317a151b79ad
child 4679 5ee96ba0c01e
     1.1 --- a/touchTest/gestureSDLTest.c	Thu Jul 29 12:26:59 2010 -0400
     1.2 +++ b/touchTest/gestureSDLTest.c	Fri Jul 30 23:18:35 2010 +0400
     1.3 @@ -28,7 +28,7 @@
     1.4  
     1.5  int colors[7] = {0xFF,0xFF00,0xFF0000,0xFFFF00,0x00FFFF,0xFF00FF,0xFFFFFF};
     1.6  
     1.7 -int index2fingerid[MAXFINGERS];
     1.8 +long index2fingerid[MAXFINGERS];
     1.9  int fingersDown;
    1.10  
    1.11  typedef struct {
    1.12 @@ -38,7 +38,7 @@
    1.13  typedef struct {
    1.14    Point p;
    1.15    float pressure;
    1.16 -  int id;
    1.17 +  long id;
    1.18  } Finger;
    1.19  
    1.20  typedef struct {
    1.21 @@ -378,7 +378,7 @@
    1.22  	    
    1.23  	    break;	    
    1.24  	  case SDL_FINGERDOWN:
    1.25 -	    printf("Finger: %i down - x: %i, y: %i\n",event.tfinger.fingerId,
    1.26 +	    printf("Finger: %li down - x: %f, y: %f\n",event.tfinger.fingerId,
    1.27  		   event.tfinger.x,event.tfinger.y);
    1.28  
    1.29  	    for(i = 0;i<MAXFINGERS;i++) 
    1.30 @@ -390,7 +390,7 @@
    1.31  	    finger[i].p.y = event.tfinger.y;
    1.32  	    break;
    1.33  	  case SDL_FINGERUP:
    1.34 -	    printf("Figner: %i up - x: %i, y: %i\n",event.tfinger.fingerId,
    1.35 +	    printf("Figner: %li up - x: %f, y: %f\n",event.tfinger.fingerId,
    1.36  	           event.tfinger.x,event.tfinger.y);
    1.37  	    for(i = 0;i<MAXFINGERS;i++) 
    1.38  	      if(index2fingerid[i] == event.tfinger.fingerId) {