Skip to content

Commit 924e540

Browse files
authored
Merge pull request #84 from yunsash/pointer_index_fix
game_activity: Fix `pointer_index()` always returning `0`
2 parents 6559dc8 + 049e660 commit 924e540

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

  • android-activity/src/game_activity

android-activity/src/game_activity/input.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -332,7 +332,7 @@ impl<'a> MotionEvent<'a> {
332332
/// or [`PointerDown`](MotionAction::PointerDown).
333333
#[inline]
334334
pub fn pointer_index(&self) -> usize {
335-
let action = self.action as u32 & ndk_sys::AMOTION_EVENT_ACTION_MASK;
335+
let action = self.action as u32;
336336
let index = (action & ndk_sys::AMOTION_EVENT_ACTION_POINTER_INDEX_MASK)
337337
>> ndk_sys::AMOTION_EVENT_ACTION_POINTER_INDEX_SHIFT;
338338
index as usize

0 commit comments

Comments
 (0)