mirror of
https://github.com/rust-mobile/android-activity.git
synced 2026-07-10 00:37:28 +00:00
Merge pull request #147 from ArthurCose/motion-event-mask
native-activity/input: OR with `EVENT_ACTION_MASK` when extracting action
This commit is contained in:
@@ -55,7 +55,8 @@ impl<'a> MotionEvent<'a> {
|
||||
// `MotionAction` enum that we share between backends, which may also
|
||||
// capture unknown variants added in new versions of Android.
|
||||
let action =
|
||||
unsafe { ndk_sys::AMotionEvent_getAction(self.ndk_event.ptr().as_ptr()) as u32 };
|
||||
unsafe { ndk_sys::AMotionEvent_getAction(self.ndk_event.ptr().as_ptr()) as u32 }
|
||||
& ndk_sys::AMOTION_EVENT_ACTION_MASK;
|
||||
action.into()
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user