Skip to content
Browse files

touchInput: only set lastMouseDownTime when numFingers == 1

  • Loading branch information...
1 parent 33eb05f commit 5aa84783c25dd208bb7f545824745180286cf7ed @bradallred bradallred committed May 24, 2013
Showing with 4 additions and 5 deletions.
  1. +4 −5 gemrb/plugins/SDLVideo/SDL20Video.cpp
View
9 gemrb/plugins/SDLVideo/SDL20Video.cpp
@@ -478,18 +478,17 @@ int SDL20VideoDriver::ProcessEvent(const SDL_Event & event)
continuingGesture = true;
break;
case SDL_FINGERDOWN:
- lastMouseDownTime = EvntManager->GetRKDelay();
- if (lastMouseDownTime != (unsigned long) ~0) {
- lastMouseDownTime += lastMouseDownTime + lastTime;
- }
-
if (!finger0) numFingers++;
continuingGesture = false;
if (numFingers == 1
// this test is for when multiple fingers begin the first touch
// commented out because we dont care right now, but if we need it i want it documented
//|| (numFingers > 1 && firstFingerDown.fingerId < 0)
) {
+ lastMouseDownTime = EvntManager->GetRKDelay();
+ if (ignoreNextFingerUp <= 0 && lastMouseDownTime != (unsigned long) ~0) {
+ lastMouseDownTime += lastMouseDownTime + lastTime;
+ }
// do not send a mouseDown event. we delay firstTouch until we know more about the context.
firstFingerDown = event.tfinger;
firstFingerDownTime = GetTickCount();

0 comments on commit 5aa8478

Please sign in to comment.
Something went wrong with that request. Please try again.