Commit 94e5c3f30e3aba8aef0752987850d39cd8ea0e1b

Sylvain 2022-02-08T11:38:34

testgesture: display device name with SDL_GetTouchName()

1
2
3
4
5
6
7
8
9
10
11
12
13
14
diff --git a/test/testgesture.c b/test/testgesture.c
index b4bce69..856fd6a 100644
--- a/test/testgesture.c
+++ b/test/testgesture.c
@@ -190,7 +190,8 @@ loop(void)
                     case SDLK_i: {
                         for (i = 0; i < SDL_GetNumTouchDevices(); ++i) {
                             const SDL_TouchID id = SDL_GetTouchDevice(i);
-                            SDL_Log("Fingers Down on device %"SDL_PRIs64": %d", id, SDL_GetNumTouchFingers(id));
+                            const char *name = SDL_GetTouchName(i);
+                            SDL_Log("Fingers Down on device %"SDL_PRIs64" (%s): %d", id, name, SDL_GetNumTouchFingers(id));
                         }
                         break;
                     }