src/video/uikit/SDL_uikitview.m
branchiOS-improvements
changeset 9519 37ade10d4570
parent 9510 e19faa3b5d88
child 9524 9de159f9cefd
     1.1 --- a/src/video/uikit/SDL_uikitview.m	Fri Oct 24 03:56:34 2014 -0300
     1.2 +++ b/src/video/uikit/SDL_uikitview.m	Fri Oct 24 04:06:45 2014 -0300
     1.3 @@ -41,9 +41,6 @@
     1.4  
     1.5      SDL_TouchID touchId;
     1.6      UITouch *leftFingerDown;
     1.7 -#ifndef IPHONE_TOUCH_EFFICIENT_DANGEROUS
     1.8 -    UITouch *finger[MAX_SIMULTANEOUS_TOUCHES];
     1.9 -#endif
    1.10  
    1.11  #if SDL_IPHONE_KEYBOARD
    1.12      UITextField *textField;
    1.13 @@ -99,24 +96,8 @@
    1.14          }
    1.15  
    1.16          CGPoint locationInView = [self touchLocation:touch shouldNormalize:YES];
    1.17 -#ifdef IPHONE_TOUCH_EFFICIENT_DANGEROUS
    1.18 -        /* FIXME: TODO: Using touch as the fingerId is potentially dangerous
    1.19 -         * It is also much more efficient than storing the UITouch pointer
    1.20 -         * and comparing it to the incoming event.
    1.21 -         */
    1.22          SDL_SendTouch(touchId, (SDL_FingerID)((size_t)touch),
    1.23                        SDL_TRUE, locationInView.x, locationInView.y, 1.0f);
    1.24 -#else
    1.25 -        int i;
    1.26 -        for(i = 0; i < MAX_SIMULTANEOUS_TOUCHES; i++) {
    1.27 -            if (finger[i] == NULL) {
    1.28 -                finger[i] = touch;
    1.29 -                SDL_SendTouch(touchId, i,
    1.30 -                              SDL_TRUE, locationInView.x, locationInView.y, 1.0f);
    1.31 -                break;
    1.32 -            }
    1.33 -        }
    1.34 -#endif
    1.35      }
    1.36  }
    1.37  
    1.38 @@ -130,20 +111,8 @@
    1.39          }
    1.40  
    1.41          CGPoint locationInView = [self touchLocation:touch shouldNormalize:YES];
    1.42 -#ifdef IPHONE_TOUCH_EFFICIENT_DANGEROUS
    1.43          SDL_SendTouch(touchId, (SDL_FingerID)((size_t)touch),
    1.44                        SDL_FALSE, locationInView.x, locationInView.y, 1.0f);
    1.45 -#else
    1.46 -        int i;
    1.47 -        for (i = 0; i < MAX_SIMULTANEOUS_TOUCHES; i++) {
    1.48 -            if (finger[i] == touch) {
    1.49 -                SDL_SendTouch(touchId, i,
    1.50 -                              SDL_FALSE, locationInView.x, locationInView.y, 1.0f);
    1.51 -                finger[i] = NULL;
    1.52 -                break;
    1.53 -            }
    1.54 -        }
    1.55 -#endif
    1.56      }
    1.57  }
    1.58  
    1.59 @@ -168,19 +137,8 @@
    1.60          }
    1.61  
    1.62          CGPoint locationInView = [self touchLocation:touch shouldNormalize:YES];
    1.63 -#ifdef IPHONE_TOUCH_EFFICIENT_DANGEROUS
    1.64          SDL_SendTouchMotion(touchId, (SDL_FingerID)((size_t)touch),
    1.65                              locationInView.x, locationInView.y, 1.0f);
    1.66 -#else
    1.67 -        int i;
    1.68 -        for (i = 0; i < MAX_SIMULTANEOUS_TOUCHES; i++) {
    1.69 -            if (finger[i] == touch) {
    1.70 -                SDL_SendTouchMotion(touchId, i,
    1.71 -                                    locationInView.x, locationInView.y, 1.0f);
    1.72 -                break;
    1.73 -            }
    1.74 -        }
    1.75 -#endif
    1.76      }
    1.77  }
    1.78