Mercurial > sdl-ios-xcode
diff touchTest/gestureSDLTest.c @ 4676:99b4560b7aa1
Upgraded touchId/fingerId to long. Changed position variables to floats.
author | jimtla |
---|---|
date | Fri, 30 Jul 2010 23:18:35 +0400 |
parents | 317a151b79ad |
children | 5ee96ba0c01e |
line wrap: on
line diff
--- a/touchTest/gestureSDLTest.c Thu Jul 29 12:26:59 2010 -0400 +++ b/touchTest/gestureSDLTest.c Fri Jul 30 23:18:35 2010 +0400 @@ -28,7 +28,7 @@ int colors[7] = {0xFF,0xFF00,0xFF0000,0xFFFF00,0x00FFFF,0xFF00FF,0xFFFFFF}; -int index2fingerid[MAXFINGERS]; +long index2fingerid[MAXFINGERS]; int fingersDown; typedef struct { @@ -38,7 +38,7 @@ typedef struct { Point p; float pressure; - int id; + long id; } Finger; typedef struct { @@ -378,7 +378,7 @@ break; case SDL_FINGERDOWN: - printf("Finger: %i down - x: %i, y: %i\n",event.tfinger.fingerId, + printf("Finger: %li down - x: %f, y: %f\n",event.tfinger.fingerId, event.tfinger.x,event.tfinger.y); for(i = 0;i<MAXFINGERS;i++) @@ -390,7 +390,7 @@ finger[i].p.y = event.tfinger.y; break; case SDL_FINGERUP: - printf("Figner: %i up - x: %i, y: %i\n",event.tfinger.fingerId, + printf("Figner: %li up - x: %f, y: %f\n",event.tfinger.fingerId, event.tfinger.x,event.tfinger.y); for(i = 0;i<MAXFINGERS;i++) if(index2fingerid[i] == event.tfinger.fingerId) {