Correct usage of SDL_AddDollarGesture (return value >= 0 on success)
authorKees Bakker <kees@ijzerbout.nl>
Thu, 27 Oct 2011 22:53:28 +0200
changeset 6068 c0a928f55a19
parent 6067 9a8faef6fdbe
child 6069 fbb37897c788
Correct usage of SDL_AddDollarGesture (return value >= 0 on success)
src/events/SDL_gesture.c
--- a/src/events/SDL_gesture.c	Thu Oct 27 22:52:03 2011 +0200
+++ b/src/events/SDL_gesture.c	Thu Oct 27 22:53:28 2011 +0200
@@ -227,7 +227,8 @@
 
         if (touchId >= 0) {
             //printf("Adding loaded gesture to 1 touch\n");
-            if (SDL_AddDollarGesture(touch,templ.path)) loaded++;
+            if (SDL_AddDollarGesture(touch, templ.path) >= 0)
+                loaded++;
         }
         else {
             //printf("Adding to: %i touches\n",SDL_numGestureTouches);