[Fix] slideshow swipe wrong direction detection. #2469

Merged
merged 1 commit into from Mar 19, 2013

Conversation

Projects
None yet
2 participants
Contributor

ulion commented Mar 19, 2013

the current code was from old code without swipe support, now we has generic swipe detector, and swipe actions, so directly use it.

else on iOS, a fast swipe left will generate events like this:

2013-03-19 21:23:33.110 XBMC[4727:707] [DEBUG] -[XBMCController handleSwipe:]: [744.000000, 300.000000], direction: 2, touch num: 1
2013-03-19 21:23:33.114 XBMC[4727:707] [DEBUG] -[XBMCController handlePan:]: <UIPanGestureRecognizer: 0x4664d60; state = Began; delaysTouchesBegan = YES; view = <IOSEAGLView 0x46f6f00>; target= <(action=handlePan:, target=<XBMCController 0x46f9420>)>>
2013-03-19 21:23:33.122 XBMC[4727:707] [DEBUG] -[XBMCController handlePan:]: <UIPanGestureRecognizer: 0x4664d60; state = Changed; delaysTouchesBegan = YES; view = <IOSEAGLView 0x46f6f00>; target= <(action=handlePan:, target=<XBMCController 0x46f9420>)>>
2013-03-19 21:23:33.124 XBMC[4727:707] [DEBUG] -[XBMCController handlePan:]: <UIPanGestureRecognizer: 0x4664d60; state = Changed; delaysTouchesBegan = YES; view = <IOSEAGLView 0x46f6f00>; target= <(action=handlePan:, target=<XBMCController 0x46f9420>)>>

so the m_firstGesturePoint is not inited yet when we got the swipe action, the old code will wrong goto the previous slide when swipe left.

Owner

Memphiz commented Mar 19, 2013

Nice one ulion as usual :)

Memphiz added a commit that referenced this pull request Mar 19, 2013

Merge pull request #2469 from ulion/fix_slideshow_swipe_wrong_direction
[Fix] slideshow swipe wrong direction detection.

@Memphiz Memphiz merged commit 9d5afbe into xbmc:master Mar 19, 2013

@ulion ulion deleted the ulion:fix_slideshow_swipe_wrong_direction branch Apr 6, 2013

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment