[Fix] slideshow swipe wrong direction detection.
authorulion <ulion2002@gmail.com>
Tue, 19 Mar 2013 13:26:55 +0000 (21:26 +0800)
committerulion <ulion2002@gmail.com>
Tue, 19 Mar 2013 13:28:21 +0000 (21:28 +0800)
xbmc/pictures/GUIWindowSlideShow.cpp

index b43595c..ebde6df 100644 (file)
@@ -645,12 +645,10 @@ EVENT_RESULT CGUIWindowSlideShow::OnMouseEvent(const CPoint &point, const CMouse
     if (m_iZoomFactor == 1 || !m_Image[m_iCurrentPic].m_bCanMoveHorizontally)
     {
       // on zoomlevel 1 just detect swipe left and right
-      if (point.x < m_firstGesturePoint.x)
+      if (event.m_id == ACTION_GESTURE_SWIPE_LEFT)
         OnAction(CAction(ACTION_NEXT_PICTURE));
       else
         OnAction(CAction(ACTION_PREV_PICTURE));
-      
-      m_firstGesturePoint.x = 0;
     }
   }
   else if (event.m_id == ACTION_GESTURE_END)