添加链接
link管理
链接快照平台
  • 输入网页链接,自动生成快照
  • 标签化管理网页链接
相关文章推荐
小胡子的石榴  ·  Quickstart: Create a ...·  2 月前    · 
怕老婆的鸵鸟  ·  "Unable to Submit: ...·  3 月前    · 
不要命的汉堡包  ·  河北航空(hebei ...·  7 月前    · 
干练的消炎药  ·  天津大学迎新网·  1 年前    · 

Hello,

I think I found a bug in the SDL/Android port.
The onTouch() method is not handling the MotionEvent.ACTION_CANCEL case.

http://developer.android.com/reference/android/view/MotionEvent.html :
“A pointer id remains valid until the pointer eventually goes up
(indicated by ACTION_UP or ACTION_POINTER_UP) or when the gesture is
canceled (indicated by ACTION_CANCEL).”

When the Java side receives ACTION_CANCEL, it should (at least)
interpret it as SDL FINGER_UP events.

Otherwise :

  • Missing events FINGER_UP
  • very small memory leak, because some SDL_AddFinger() are never
    released with a SDL_DelFinger()
  • SDL_GetNumTouchFingers() reports a wrong count
  • It’s not obvious to trigger the ACTION_CANCEL (needs to tap with 3+
    finger on the tablet).
    I can’t reproduced it with Nexus7 but it happens with HTC ONE.

    reported + some patch here:
    https://bugzilla.libsdl.org/show_bug.cgi?id=2558

    Cheers,

    Sylvain