src/video/uikit/SDL_uikitview.m
changeset 10366 e1b52e69578b
parent 10340 5724f5087acd
child 10710 a6babd973955
     1.1 --- a/src/video/uikit/SDL_uikitview.m	Sat Sep 24 13:28:40 2016 -0300
     1.2 +++ b/src/video/uikit/SDL_uikitview.m	Sat Sep 24 18:46:34 2016 -0300
     1.3 @@ -143,12 +143,13 @@
     1.4  
     1.5          if (!firstFingerDown) {
     1.6              CGPoint locationInView = [self touchLocation:touch shouldNormalize:NO];
     1.7 +            int clicks = (int) touch.tapCount;
     1.8  
     1.9              /* send mouse moved event */
    1.10              SDL_SendMouseMotion(sdlwindow, SDL_TOUCH_MOUSEID, 0, locationInView.x, locationInView.y);
    1.11  
    1.12              /* send mouse down event */
    1.13 -            SDL_SendMouseButton(sdlwindow, SDL_TOUCH_MOUSEID, SDL_PRESSED, SDL_BUTTON_LEFT);
    1.14 +            SDL_SendMouseButtonClicks(sdlwindow, SDL_TOUCH_MOUSEID, SDL_PRESSED, SDL_BUTTON_LEFT, clicks);
    1.15  
    1.16              firstFingerDown = touch;
    1.17          }
    1.18 @@ -166,7 +167,8 @@
    1.19  
    1.20          if (touch == firstFingerDown) {
    1.21              /* send mouse up */
    1.22 -            SDL_SendMouseButton(sdlwindow, SDL_TOUCH_MOUSEID, SDL_RELEASED, SDL_BUTTON_LEFT);
    1.23 +            int clicks = (int) touch.tapCount;
    1.24 +            SDL_SendMouseButtonClicks(sdlwindow, SDL_TOUCH_MOUSEID, SDL_RELEASED, SDL_BUTTON_LEFT, clicks);
    1.25              firstFingerDown = nil;
    1.26          }
    1.27