Skip to content

Commit

Permalink
toggle and reset IR
Browse files Browse the repository at this point in the history
  • Loading branch information
weihuoya committed Jan 13, 2019
1 parent a480fb1 commit d5c2e4b
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -319,6 +319,10 @@ else if(button.getTrackId() == pointerId)
if(button.getTrackId() == pointerId)
{
button.onPointerUp(pointerId, pointerX, pointerY);
if (mOverlayPointer != null && button.getId() == ButtonType.HOTKEYS_UPRIGHT_TOGGLE)
{
mOverlayPointer.reset();
}
isProcessed = true;
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,16 @@ public InputOverlayPointer(float width, float height)
mTrackId = -1;
}

public void reset()
{
mTrackId = -1;
mAxises[0] = mAxises[1] = mAxises[2] = mAxises[3] = 0;
for (int i = 0; i < 4; i++)
{
NativeLibrary.onGamePadMoveEvent(NativeLibrary.TouchScreenDevice, mAxisIDs[i], mAxises[i]);
}
}

public int getTrackId()
{
return mTrackId;
Expand Down

0 comments on commit d5c2e4b

Please sign in to comment.