From 14c24e1fabb3870fa85fbbcd22bdbf20a45d9b28 Mon Sep 17 00:00:00 2001 From: Vladimir Serbinenko Date: Tue, 28 Jan 2020 17:00:28 +0100 Subject: [PATCH] Remove unnecessarry check for AMotionEvent_getX Unlike getAxis getX is always present and doesn't need to be checked --- input/drivers/android_input.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/input/drivers/android_input.c b/input/drivers/android_input.c index f387223fa9..8b8e24c89b 100644 --- a/input/drivers/android_input.c +++ b/input/drivers/android_input.c @@ -698,7 +698,7 @@ static INLINE void android_mouse_calculate_deltas(android_input_t *android, * compared to AXIS_RELATIVE because once the Android mouse cursor hits the edge of the screen it is * not possible to move the in-game mouse any further in that direction. */ - if (!x && !y && AMotionEvent_getX && AMotionEvent_getX) + if (!x && !y) { x = (AMotionEvent_getX(event, motion_ptr) - android->mouse_x_prev); y = (AMotionEvent_getY(event, motion_ptr) - android->mouse_y_prev);