Skip to content

Commit add58db

Browse files
committed
native-activity: Fix copy&paste mistake in MotionEvent::action()
1 parent d16cb79 commit add58db

File tree

1 file changed

+3
-3
lines changed
  • android-activity/src/native_activity

1 file changed

+3
-3
lines changed

android-activity/src/native_activity/input.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,10 +51,10 @@ impl<'a> MotionEvent<'a> {
5151
/// See [the MotionEvent docs](https://developer.android.com/reference/android/view/MotionEvent#getActionMasked())
5252
#[inline]
5353
pub fn action(&self) -> MotionAction {
54-
// XXX: we use `AInputEvent_getAction` directly since we have our own
55-
// `KeyAction` enum that we share between backends, which may also
54+
// XXX: we use `AMotionEvent_getAction` directly since we have our own
55+
// `MotionAction` enum that we share between backends, which may also
5656
// capture unknown variants added in new versions of Android.
57-
let action = unsafe { ndk_sys::AKeyEvent_getAction(self.ndk_event.ptr().as_ptr()) as u32 };
57+
let action = unsafe { ndk_sys::AMotionEvent_getAction(self.ndk_event.ptr().as_ptr()) as u32 };
5858
action.into()
5959
}
6060

0 commit comments

Comments
 (0)