Bug 4576: remove touch/mouse duplication for IOS
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61
diff --git a/src/video/uikit/SDL_uikitview.m b/src/video/uikit/SDL_uikitview.m
index d1f72d0..3945953 100644
--- a/src/video/uikit/SDL_uikitview.m
+++ b/src/video/uikit/SDL_uikitview.m
@@ -41,8 +41,6 @@ extern int SDL_AppleTVRemoteOpenedAsJoystick;
SDL_TouchID directTouchId;
SDL_TouchID indirectTouchId;
-
- UITouch * __weak firstFingerDown;
}
- (instancetype)initWithFrame:(CGRect)frame
@@ -218,18 +216,7 @@ extern int SDL_AppleTVRemoteOpenedAsJoystick;
continue;
}
- if (!firstFingerDown) {
- CGPoint locationInView = [self touchLocation:touch shouldNormalize:NO];
- int clicks = (int) touch.tapCount;
-
- /* send mouse moved event */
- SDL_SendMouseMotion(sdlwindow, SDL_TOUCH_MOUSEID, 0, locationInView.x, locationInView.y);
-
- /* send mouse down event */
- SDL_SendMouseButtonClicks(sdlwindow, SDL_TOUCH_MOUSEID, SDL_PRESSED, SDL_BUTTON_LEFT, clicks);
-
- firstFingerDown = touch;
- }
+ /* FIXME, need to send: int clicks = (int) touch.tapCount; ? */
CGPoint locationInView = [self touchLocation:touch shouldNormalize:YES];
SDL_SendTouch(touchId, (SDL_FingerID)((size_t)touch),
@@ -248,12 +235,7 @@ extern int SDL_AppleTVRemoteOpenedAsJoystick;
continue;
}
- if (touch == firstFingerDown) {
- /* send mouse up */
- int clicks = (int) touch.tapCount;
- SDL_SendMouseButtonClicks(sdlwindow, SDL_TOUCH_MOUSEID, SDL_RELEASED, SDL_BUTTON_LEFT, clicks);
- firstFingerDown = nil;
- }
+ /* FIXME, need to send: int clicks = (int) touch.tapCount; ? */
CGPoint locationInView = [self touchLocation:touch shouldNormalize:YES];
SDL_SendTouch(touchId, (SDL_FingerID)((size_t)touch),
@@ -277,13 +259,6 @@ extern int SDL_AppleTVRemoteOpenedAsJoystick;
continue;
}
- if (touch == firstFingerDown) {
- CGPoint locationInView = [self touchLocation:touch shouldNormalize:NO];
-
- /* send moved event */
- SDL_SendMouseMotion(sdlwindow, SDL_TOUCH_MOUSEID, 0, locationInView.x, locationInView.y);
- }
-
CGPoint locationInView = [self touchLocation:touch shouldNormalize:YES];
SDL_SendTouchMotion(touchId, (SDL_FingerID)((size_t)touch),
locationInView.x, locationInView.y, pressure);