Skip to content

Commit

Permalink
Merge pull request #60442 from madmiraal/remove-superfluous-inputmana…
Browse files Browse the repository at this point in the history
…ger-3.x
  • Loading branch information
akien-mga authored Apr 25, 2022
2 parents 4c47e40 + b540281 commit ba21c76
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 242 deletions.
2 changes: 0 additions & 2 deletions misc/scripts/clang_format.sh
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,6 @@ while IFS= read -rd '' f; do
continue 2
elif [[ "$f" == *"theme_data.h" ]]; then
continue 2
elif [[ "$f" == "platform/android/java/lib/src/org/godotengine/godot/input/InputManager"* ]]; then
continue 2
elif [[ "$f" == "platform/android/java/lib/src/org/godotengine/godot/gl/GLSurfaceView"* ]]; then
continue 2
elif [[ "$f" == "platform/android/java/lib/src/org/godotengine/godot/gl/EGLLogWrapper"* ]]; then
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,9 @@

import org.godotengine.godot.GodotLib;
import org.godotengine.godot.GodotView;
import org.godotengine.godot.input.InputManagerCompat.InputDeviceListener;

import android.content.Context;
import android.hardware.input.InputManager;
import android.os.Build;
import android.util.Log;
import android.util.SparseArray;
Expand All @@ -53,18 +54,18 @@
/**
* Handles input related events for the {@link GodotView} view.
*/
public class GodotInputHandler implements InputDeviceListener {
public class GodotInputHandler implements InputManager.InputDeviceListener {
private final String tag = this.getClass().getSimpleName();

private final SparseIntArray mJoystickIds = new SparseIntArray(4);
private final SparseArray<Joystick> mJoysticksDevices = new SparseArray<>(4);

private final GodotView godotView;
private final InputManagerCompat inputManager;
private final InputManager inputManager;

public GodotInputHandler(GodotView godotView) {
this.godotView = godotView;
this.inputManager = InputManagerCompat.Factory.getInputManager(godotView.getContext());
this.inputManager = (InputManager)godotView.getContext().getSystemService(Context.INPUT_SERVICE);
this.inputManager.registerInputDeviceListener(this, null);
}

Expand Down

This file was deleted.

This file was deleted.

0 comments on commit ba21c76

Please sign in to comment.