Android: fix touch ir from pr7829 changes
This commit is contained in:
parent
672b582bec
commit
dc51b95313
|
@ -298,12 +298,14 @@ public final class InputOverlay extends SurfaceView implements OnTouchListener
|
||||||
if (!pressed && overlayPointer != null)
|
if (!pressed && overlayPointer != null)
|
||||||
{
|
{
|
||||||
overlayPointer.onTouch(event);
|
overlayPointer.onTouch(event);
|
||||||
float[] axises = overlayPointer.getAxisValues();
|
float[] axes = overlayPointer.getAxisValues();
|
||||||
|
|
||||||
NativeLibrary.onGamePadMoveEvent(NativeLibrary.TouchScreenDevice, ButtonType.WIIMOTE_IR + 2,
|
for (int i = 0; i < 4; i++)
|
||||||
axises[0]);
|
{
|
||||||
NativeLibrary.onGamePadMoveEvent(NativeLibrary.TouchScreenDevice, ButtonType.WIIMOTE_IR + 4,
|
NativeLibrary
|
||||||
axises[1]);
|
.onGamePadMoveEvent(NativeLibrary.TouchScreenDevice, ButtonType.WIIMOTE_IR_UP + i,
|
||||||
|
axes[i]);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
invalidate();
|
invalidate();
|
||||||
|
|
|
@ -127,9 +127,11 @@ public class InputOverlayPointer
|
||||||
|
|
||||||
public float[] getAxisValues()
|
public float[] getAxisValues()
|
||||||
{
|
{
|
||||||
float[] ir = {0f, 0f};
|
float[] iraxes = {0f, 0f, 0f, 0f};
|
||||||
ir[0] = axes[0];
|
iraxes[1] = axes[0];
|
||||||
ir[1] = axes[1];
|
iraxes[0] = axes[0];
|
||||||
return axes;
|
iraxes[3] = axes[1];
|
||||||
|
iraxes[2] = axes[1];
|
||||||
|
return iraxes;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue