add "i" shortcut to testgesture tool to log # of fingers down on the touch devices.
authorEdward Rudd <urkle@outoforder.cc>
Sun, 23 Nov 2014 15:39:28 -0500
changeset 9235 ba9988f0daec
parent 9234 199baca091f9
child 9236 a845edf98a80
add "i" shortcut to testgesture tool to log # of fingers down on the touch devices.
test/testgesture.c
--- a/test/testgesture.c	Sun Nov 23 15:21:49 2014 -0500
+++ b/test/testgesture.c	Sun Nov 23 15:39:28 2014 -0500
@@ -215,6 +215,15 @@
       case SDL_KEYDOWN:
         switch (event.key.keysym.sym)
           {
+              case SDLK_i:
+              {
+                  int i;
+                  for (i = 0; i < SDL_GetNumTouchDevices(); ++i) {
+                      SDL_TouchID id = SDL_GetTouchDevice(i);
+                      SDL_Log("Fingers Down on device %"SDL_PRIs64": %d", id, SDL_GetNumTouchFingers(id));
+                  }
+                  break;
+              }
           case SDLK_SPACE:
         SDL_RecordGesture(-1);
         break;