src/video/android/SDL_androidtouch.c
changeset 12404 eb60e952b13f
parent 11811 5d94cb6b24d3
child 12494 6053ab61996a
equal deleted inserted replaced
12403:a4d730631698 12404:eb60e952b13f
    70     SDL_AddHintCallback(SDL_HINT_ANDROID_SEPARATE_MOUSE_AND_TOUCH,
    70     SDL_AddHintCallback(SDL_HINT_ANDROID_SEPARATE_MOUSE_AND_TOUCH,
    71                         SeparateEventsHintWatcher, NULL);
    71                         SeparateEventsHintWatcher, NULL);
    72 
    72 
    73     if (0 < number) {
    73     if (0 < number) {
    74         for (i = 0; i < number; ++i) {
    74         for (i = 0; i < number; ++i) {
    75             SDL_AddTouch((SDL_TouchID) ids[i], ""); /* no error handling */
    75             SDL_AddTouch((SDL_TouchID) ids[i], SDL_TOUCH_DEVICE_DIRECT, ""); /* no error handling */
    76         }
    76         }
    77         SDL_free(ids);
    77         SDL_free(ids);
    78     }
    78     }
    79 }
    79 }
    80 
    80 
    95     if (!Android_Window) {
    95     if (!Android_Window) {
    96         return;
    96         return;
    97     }
    97     }
    98 
    98 
    99     touchDeviceId = (SDL_TouchID)touch_device_id_in;
    99     touchDeviceId = (SDL_TouchID)touch_device_id_in;
   100     if (SDL_AddTouch(touchDeviceId, "") < 0) {
   100     if (SDL_AddTouch(touchDeviceId, SDL_TOUCH_DEVICE_DIRECT, "") < 0) {
   101         SDL_Log("error: can't add touch %s, %d", __FILE__, __LINE__);
   101         SDL_Log("error: can't add touch %s, %d", __FILE__, __LINE__);
   102     }
   102     }
   103 
   103 
   104     fingerId = (SDL_FingerID)pointer_finger_id_in;
   104     fingerId = (SDL_FingerID)pointer_finger_id_in;
   105     switch (action) {
   105     switch (action) {