rust-mobile / android-activity

Glue for building Rust applications on Android with NativeActivity or GameActivity
239 stars 48 forks source link

game_activity: Fix `pointer_index()` always returning `0` #84

Closed sannyun closed 1 year ago

sannyun commented 1 year ago

Given AMOTION_EVENT_ACTION_MASK is 0xff and AMOTION_EVENT_ACTION_POINTER_INDEX_MASK is 0xff00, this function always returns 0. Looks like ANDing with AMOTION_EVENT_ACTION_MASK should be removed.

rib commented 1 year ago

Thanks, yeah this looks wrong. I doubt I was planning to validate the action and probably just made a mistake at the time, oops.