diff --git a/backends/platform/ios7/ios7_osys_events.cpp b/backends/platform/ios7/ios7_osys_events.cpp index 9880ade53ab..14cf8f0072f 100644 --- a/backends/platform/ios7/ios7_osys_events.cpp +++ b/backends/platform/ios7/ios7_osys_events.cpp @@ -204,8 +204,6 @@ bool OSystem_iOS7::handleEvent_mouseUp(Common::Event &event, int x, int y) { bool OSystem_iOS7::handleEvent_secondMouseDown(Common::Event &event, int x, int y) { _lastSecondaryDown = getMillis(); - _gestureStartX = x; - _gestureStartY = y; if (_mouseClickAndDragEnabled) { event.type = Common::EVENT_LBUTTONUP; @@ -306,68 +304,6 @@ bool OSystem_iOS7::handleEvent_mouseDragged(Common::Event &event, int x, int y) } bool OSystem_iOS7::handleEvent_mouseSecondDragged(Common::Event &event, int x, int y) { - if (_gestureStartX == -1 || _gestureStartY == -1) { - return false; - } - - static const int kNeededLength = 100; - static const int kMaxDeviation = 20; - - int vecX = (x - _gestureStartX); - int vecY = (y - _gestureStartY); - - int absX = abs(vecX); - int absY = abs(vecY); - - //printf("(%d, %d)\n", vecX, vecY); - - if (absX >= kNeededLength || absY >= kNeededLength) { // Long enough gesture to react upon. - _gestureStartX = -1; - _gestureStartY = -1; - - if (absX < kMaxDeviation && vecY >= kNeededLength) { - // Swipe down - event.type = Common::EVENT_MAINMENU; - _queuedInputEvent.type = Common::EVENT_INVALID; - - _queuedEventTime = getMillis() + kQueuedInputEventDelay; - return true; - } - - if (absX < kMaxDeviation && -vecY >= kNeededLength) { - // Swipe up - _mouseClickAndDragEnabled = !_mouseClickAndDragEnabled; - Common::U32String dialogMsg; - if (_mouseClickAndDragEnabled) { - _touchpadModeEnabled = false; - dialogMsg = _("Mouse-click-and-drag mode enabled."); - } else - dialogMsg = _("Mouse-click-and-drag mode disabled."); - GUI::TimedMessageDialog dialog(dialogMsg, 1500); - dialog.runModal(); - return false; - } - - if (absY < kMaxDeviation && vecX >= kNeededLength) { - // Swipe right - _touchpadModeEnabled = !_touchpadModeEnabled; - Common::U32String dialogMsg; - if (_touchpadModeEnabled) - dialogMsg = _("Touchpad mode enabled."); - else - dialogMsg = _("Touchpad mode disabled."); - GUI::TimedMessageDialog dialog(dialogMsg, 1500); - dialog.runModal(); - return false; - - } - - if (absY < kMaxDeviation && -vecX >= kNeededLength) { - // Swipe left - return false; - } - } - return false; } diff --git a/backends/platform/ios7/ios7_osys_main.cpp b/backends/platform/ios7/ios7_osys_main.cpp index abb274a23e3..5378f81ed31 100644 --- a/backends/platform/ios7/ios7_osys_main.cpp +++ b/backends/platform/ios7/ios7_osys_main.cpp @@ -88,7 +88,7 @@ OSystem_iOS7::OSystem_iOS7() : _mixer(NULL), _lastMouseTap(0), _queuedEventTime(0), _mouseNeedTextureUpdate(false), _secondaryTapped(false), _lastSecondaryTap(0), _screenOrientation(kScreenOrientationFlippedLandscape), - _gestureStartX(-1), _gestureStartY(-1), _fullScreenIsDirty(false), _fullScreenOverlayIsDirty(false), + _fullScreenIsDirty(false), _fullScreenOverlayIsDirty(false), _mouseDirty(false), _timeSuspended(0), _lastDragPosX(-1), _lastDragPosY(-1), _screenChangeCount(0), _mouseCursorPaletteEnabled(false), _gfxTransactionError(kTransactionSuccess) { _queuedInputEvent.type = Common::EVENT_INVALID; diff --git a/backends/platform/ios7/ios7_osys_main.h b/backends/platform/ios7/ios7_osys_main.h index 5cb0ca75f83..6a7a87a8bf3 100644 --- a/backends/platform/ios7/ios7_osys_main.h +++ b/backends/platform/ios7/ios7_osys_main.h @@ -87,7 +87,6 @@ protected: bool _secondaryTapped; long _lastSecondaryDown; long _lastSecondaryTap; - int _gestureStartX, _gestureStartY; bool _mouseClickAndDragEnabled; bool _touchpadModeEnabled; int _lastPadX;