소스 검색

add "i" shortcut to testgesture tool to log # of fingers down on the touch devices.

Edward Rudd 11 년 전
부모
커밋
8c9341b92d
1개의 변경된 파일9개의 추가작업 그리고 0개의 파일을 삭제
  1. 9 0
      test/testgesture.c

+ 9 - 0
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;