Skip to content
This repository has been archived by the owner on Jan 5, 2022. It is now read-only.

Commit

Permalink
Fixed Mac bug where the trigger input will go back to 0.5 if the game…
Browse files Browse the repository at this point in the history
… goes out of focus. See issue #16
  • Loading branch information
Jibran Ibrahim Syed committed Feb 2, 2016
1 parent d2b1f99 commit 3de4b57
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions XboxCtrlrInput/Assets/XboxCtrlrInput/XboxCtrlrInput.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1709,6 +1709,14 @@ void OnLevelWasLoaded(int level)
this.ResetTriggerTouches();
}

void OnApplicationFocus(bool isWindowInFocusNow)
{
if(!isWindowInFocusNow)
{
this.ResetTriggerTouches();
}
}

private void ResetTriggerTouches()
{
this.u3dTrigger0LeftIsTouched = false;
Expand Down

0 comments on commit 3de4b57

Please sign in to comment.