Skip to content

Commit 672360c

Browse files
committed
Fix multitouch MotionActions processing as unknown in native activities
1 parent 9fce890 commit 672360c

File tree

1 file changed

+2
-1
lines changed
  • android-activity/src/native_activity

1 file changed

+2
-1
lines changed

android-activity/src/native_activity/input.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,8 @@ impl<'a> MotionEvent<'a> {
5555
// `MotionAction` enum that we share between backends, which may also
5656
// capture unknown variants added in new versions of Android.
5757
let action =
58-
unsafe { ndk_sys::AMotionEvent_getAction(self.ndk_event.ptr().as_ptr()) as u32 };
58+
unsafe { ndk_sys::AMotionEvent_getAction(self.ndk_event.ptr().as_ptr()) as u32 }
59+
& ndk_sys::AMOTION_EVENT_ACTION_MASK;
5960
action.into()
6061
}
6162

0 commit comments

Comments
 (0)