Permalink
Browse files

touchInput: only begin a drag gesture if the movement delta is <= the…

… min
  • Loading branch information...
1 parent b78b77a commit 33eb05fc691bda90e563301ddb8352fd8d576fe4 @bradallred bradallred committed May 24, 2013
Showing with 13 additions and 0 deletions.
  1. +13 −0 gemrb/plugins/SDLVideo/SDL20Video.cpp
@@ -455,6 +455,19 @@ int SDL20VideoDriver::ProcessEvent(const SDL_Event & event)
HideSoftKeyboard();
}
} else if (numFingers == 1) { //click and drag
+ if (!continuingGesture) {
+ int x = event.tfinger.dx * width;
+ int y = event.tfinger.dy * height;
+ if ((x >= -MIN_GESTURE_DELTA_PIXELS
+ && x <= MIN_GESTURE_DELTA_PIXELS)
+ ||
+ (y >= -MIN_GESTURE_DELTA_PIXELS
+ && y <= MIN_GESTURE_DELTA_PIXELS)) {
+ break;
+ } else /*if (focusCtrl && focusCtrl->ControlType != IE_GUI_GAMECONTROL)*/ {
+ //break;
+ }
+ }
ProcessFirstTouch(GEM_MB_ACTION);
//ignoreNextFingerUp--;
// standard mouse movement

0 comments on commit 33eb05f

Please sign in to comment.