src/video/uikit/SDL_uikitview.m
changeset 7050 aa1f44908402
parent 6951 7833f01322b3
child 7111 f4ae9f1233df
child 8460 f483e8bdae3c
     1.1 --- a/src/video/uikit/SDL_uikitview.m	Wed Apr 03 10:36:15 2013 -0400
     1.2 +++ b/src/video/uikit/SDL_uikitview.m	Wed Apr 03 11:34:21 2013 -0400
     1.3 @@ -94,7 +94,7 @@
     1.4              /* send mouse down event */
     1.5              SDL_SendMouseButton(NULL, SDL_TOUCH_MOUSEID, SDL_PRESSED, SDL_BUTTON_LEFT);
     1.6  
     1.7 -            leftFingerDown = (SDL_FingerID)touch;
     1.8 +            leftFingerDown = touch;
     1.9          }
    1.10  
    1.11          CGPoint locationInView = [self touchLocation:touch shouldNormalize:YES];
    1.12 @@ -102,7 +102,7 @@
    1.13          // FIXME: TODO: Using touch as the fingerId is potentially dangerous
    1.14          // It is also much more efficient than storing the UITouch pointer
    1.15          // and comparing it to the incoming event.
    1.16 -        SDL_SendTouch(touchId, (SDL_FingerID)touch,
    1.17 +        SDL_SendTouch(touchId, (SDL_FingerID)((size_t)touch),
    1.18                        SDL_TRUE, locationInView.x, locationInView.y, 1.0f);
    1.19  #else
    1.20          int i;
    1.21 @@ -125,10 +125,10 @@
    1.22      UITouch *touch = (UITouch*)[enumerator nextObject];
    1.23  
    1.24      while(touch) {
    1.25 -        if ((SDL_FingerID)touch == leftFingerDown) {
    1.26 +        if (touch == leftFingerDown) {
    1.27              /* send mouse up */
    1.28              SDL_SendMouseButton(NULL, SDL_TOUCH_MOUSEID, SDL_RELEASED, SDL_BUTTON_LEFT);
    1.29 -            leftFingerDown = 0;
    1.30 +            leftFingerDown = nil;
    1.31          }
    1.32  
    1.33          CGPoint locationInView = [self touchLocation:touch shouldNormalize:YES];
    1.34 @@ -166,7 +166,7 @@
    1.35      UITouch *touch = (UITouch*)[enumerator nextObject];
    1.36  
    1.37      while (touch) {
    1.38 -        if ((SDL_FingerID)touch == leftFingerDown) {
    1.39 +        if (touch == leftFingerDown) {
    1.40              CGPoint locationInView = [self touchLocation:touch shouldNormalize:NO];
    1.41  
    1.42              /* send moved event */