Fix android build.

This commit is contained in:
Relintai 2022-09-17 12:30:19 +02:00
parent ccba47dc7c
commit 554cf8c861
2 changed files with 5 additions and 3 deletions

View File

@ -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

View File

@ -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<Joystick> 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;