Skip to content
Permalink
Browse files

Android: fix touch ir from pr7829 changes

  • Loading branch information...
zackhow committed Mar 23, 2019
1 parent 672b582 commit dc51b95313d0903bc82d941d66450a95c2b0f85e
@@ -298,12 +298,14 @@ public boolean onTouch(View v, MotionEvent event)
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();
@@ -127,9 +127,11 @@ private void touchPress()

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;
}
}

0 comments on commit dc51b95

Please sign in to comment.
You can’t perform that action at this time.