diff --git a/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/overlay/InputOverlay.java b/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/overlay/InputOverlay.java index c2f0ca473e..40e4a3d6ed 100644 --- a/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/overlay/InputOverlay.java +++ b/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/overlay/InputOverlay.java @@ -298,12 +298,14 @@ public final class InputOverlay extends SurfaceView implements OnTouchListener if (!pressed && overlayPointer != null) { overlayPointer.onTouch(event); - float[] axises = overlayPointer.getAxisValues(); + float[] axes = overlayPointer.getAxisValues(); - NativeLibrary.onGamePadMoveEvent(NativeLibrary.TouchScreenDevice, ButtonType.WIIMOTE_IR + 2, - axises[0]); - NativeLibrary.onGamePadMoveEvent(NativeLibrary.TouchScreenDevice, ButtonType.WIIMOTE_IR + 4, - axises[1]); + for (int i = 0; i < 4; i++) + { + NativeLibrary + .onGamePadMoveEvent(NativeLibrary.TouchScreenDevice, ButtonType.WIIMOTE_IR_UP + i, + axes[i]); + } } invalidate(); diff --git a/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/overlay/InputOverlayPointer.java b/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/overlay/InputOverlayPointer.java index 8280e73913..18ce190f15 100644 --- a/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/overlay/InputOverlayPointer.java +++ b/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/overlay/InputOverlayPointer.java @@ -127,9 +127,11 @@ public class InputOverlayPointer public float[] getAxisValues() { - float[] ir = {0f, 0f}; - ir[0] = axes[0]; - ir[1] = axes[1]; - return axes; + float[] iraxes = {0f, 0f, 0f, 0f}; + iraxes[1] = axes[0]; + iraxes[0] = axes[0]; + iraxes[3] = axes[1]; + iraxes[2] = axes[1]; + return iraxes; } }