From 8c9341b92d622a8b587bb196ecf60e32b03309f7 Mon Sep 17 00:00:00 2001 From: Edward Rudd Date: Sun, 23 Nov 2014 15:39:28 -0500 Subject: [PATCH] add "i" shortcut to testgesture tool to log # of fingers down on the touch devices. --- test/testgesture.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/test/testgesture.c b/test/testgesture.c index f6658dbb3..9e4f1dffa 100644 --- a/test/testgesture.c +++ b/test/testgesture.c @@ -215,6 +215,15 @@ int main(int argc, char* argv[]) 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;