Skip to content
This repository
Browse code

[touch] fix missing call to OnTouchGestureStart() from CGenericTouchI…

…nputHandler if only the secondary pointer moved
  • Loading branch information...
commit 2cbf2c6f3c6be73d99ad4c70aafb5b23e36ad31b 1 parent 8d76aa2
Sascha Montellese authored March 29, 2013
16  xbmc/input/touch/generic/GenericTouchInputHandler.cpp
@@ -212,9 +212,17 @@ bool CGenericTouchInputHandler::HandleTouchInput(TouchInput event, float x, floa
212 212
           m_gestureState == TouchGestureMultiTouchDone)
213 213
         break;
214 214
 
215  
-      triggerDetectors(event, pointer);
  215
+      bool moving = false;
  216
+      for (unsigned int index = 0; index < TOUCH_MAX_POINTERS; index++)
  217
+      {
  218
+        if (m_pointers[index].valid() && m_pointers[index].moving)
  219
+        {
  220
+          moving = true;
  221
+          break;
  222
+        }
  223
+      }
216 224
 
217  
-      if (m_pointers[pointer].moving)
  225
+      if (moving)
218 226
       {
219 227
         m_holdTimer->Stop();
220 228
 
@@ -223,6 +231,8 @@ bool CGenericTouchInputHandler::HandleTouchInput(TouchInput event, float x, floa
223 231
           result = OnTouchGestureStart(m_pointers[pointer].down.x, m_pointers[pointer].down.y);
224 232
       }
225 233
 
  234
+      triggerDetectors(event, pointer);
  235
+
226 236
       if (m_gestureState == TouchGestureSingleTouch)
227 237
       {
228 238
         // Check if the touch has moved far enough to count as movement
@@ -260,7 +270,7 @@ bool CGenericTouchInputHandler::HandleTouchInput(TouchInput event, float x, floa
260 270
       }
261 271
       else if (m_gestureState == TouchGestureMultiTouch)
262 272
       {
263  
-        if (m_pointers[pointer].moving)
  273
+        if (moving)
264 274
           result = OnMultiTouchMove(x, y,offsetX, offsetY, velocityX, velocityY, pointer);
265 275
       }
266 276
       else

0 notes on commit 2cbf2c6

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