diff --git a/platform/android/android_input_handler.cpp b/platform/android/android_input_handler.cpp index 1115867ec..efb68a81a 100644 --- a/platform/android/android_input_handler.cpp +++ b/platform/android/android_input_handler.cpp @@ -237,7 +237,7 @@ void AndroidInputHandler::_release_mouse_event_info() { } void AndroidInputHandler::process_mouse_event(int p_event_action, int p_event_android_buttons_mask, Point2 p_event_pos, Vector2 p_delta, bool p_double_click) { - int event_buttons_mask = _android_button_mask_to_godot_button_mask(p_event_android_buttons_mask); + int event_buttons_mask = _android_button_mask_to_pandemonium_button_mask(p_event_android_buttons_mask); switch (p_event_action) { case AMOTION_EVENT_ACTION_HOVER_MOVE: // hover move case AMOTION_EVENT_ACTION_HOVER_ENTER: // hover enter diff --git a/platform/android/java/lib/src/net/relintai/pandemonium/pandemonium/input/PandemoniumInputHandler.java b/platform/android/java/lib/src/net/relintai/pandemonium/pandemonium/input/PandemoniumInputHandler.java index bccb1b476..f917d080e 100644 --- a/platform/android/java/lib/src/net/relintai/pandemonium/pandemonium/input/PandemoniumInputHandler.java +++ b/platform/android/java/lib/src/net/relintai/pandemonium/pandemonium/input/PandemoniumInputHandler.java @@ -45,6 +45,8 @@ import android.view.InputDevice; import android.view.KeyEvent; import android.view.MotionEvent; import android.view.ScaleGestureDetector; +import android.content.Context; +import android.hardware.input.InputManager; import java.util.Collections; import java.util.HashSet; @@ -53,14 +55,14 @@ import java.util.Set; /** * Handles input related events for the {@link PandemoniumView} view. */ -public class PandemoniumInputHandler implements InputDeviceListener { +public class PandemoniumInputHandler implements InputManager.InputDeviceListener { private static final String TAG = PandemoniumInputHandler.class.getSimpleName(); private final SparseIntArray mJoystickIds = new SparseIntArray(4); private final SparseArray mJoysticksDevices = new SparseArray<>(4); private final PandemoniumView pandemoniumView; - private final InputManagerCompat inputManager; + private final InputManager inputManager; private final GestureDetector gestureDetector; private final ScaleGestureDetector scaleGestureDetector; private final PandemoniumGestureHandler pandemoniumGestureHandler;