summaryrefslogtreecommitdiff
path: root/test/testgesture.c
diff options
context:
space:
mode:
authorEdward Rudd <urkle@outoforder.cc>2014-11-23 15:39:28 -0500
committerEdward Rudd <urkle@outoforder.cc>2014-11-23 15:39:28 -0500
commitfbcb32c9c9bb8592ff301062ddf132afadb7b77d (patch)
treed1ec0e8a1f8b0a2f89805af2ce277a2d877a5158 /test/testgesture.c
parentdb1a79a2d8710984d489162413deefc6c74f860f (diff)
downloadsdl-fbcb32c9c9bb8592ff301062ddf132afadb7b77d.tar.gz
add "i" shortcut to testgesture tool to log # of fingers down on the touch devices.
Diffstat (limited to 'test/testgesture.c')
-rw-r--r--test/testgesture.c9
1 files changed, 9 insertions, 0 deletions
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;