Mercurial > sdl-ios-xcode
diff src/events/SDL_gesture.c @ 4682:4ba1048a324c
Minimized functionality of gestureSDLTest.
author | Jim Grandpre <jim.tla@gmail.com> |
---|---|
date | Tue, 03 Aug 2010 00:18:00 -0400 |
parents | 5378f2d0754f |
children | 15dfe42edbfd |
line wrap: on
line diff
--- a/src/events/SDL_gesture.c Mon Aug 02 00:14:53 2010 -0400 +++ b/src/events/SDL_gesture.c Tue Aug 03 00:18:00 2010 -0400 @@ -117,17 +117,12 @@ int i; //No Longer storing the Hash, rehash on load - //fprintf(fp,"%lu ",templ->hash); //if(SDL_RWops.write(src,&(templ->hash),sizeof(templ->hash),1) != 1) return 0; - - /* - for(i = 0;i < DOLLARNPOINTS;i++) { - fprintf(fp,"%i %i ",(int)templ->path[i].x,(int)templ->path[i].y); - } - fprintf(fp,"\n"); - */ - if(SDL_RWwrite(src,templ->path,sizeof(templ->path[0]),DOLLARNPOINTS) != DOLLARNPOINTS) return 0; + if(SDL_RWwrite(src,templ->path, + sizeof(templ->path[0]),DOLLARNPOINTS) != DOLLARNPOINTS) + return 0; + return 1; } @@ -499,7 +494,7 @@ j = -1; break; } - else { + else if(event->type == SDL_FINGERMOTION) { float dx = x - inTouch->gestureLast[j].f.p.x; float dy = y - inTouch->gestureLast[j].f.p.y; DollarPath* path = &inTouch->gestureLast[j].dollarPath;