Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Merge pull request #9082 from JosJuice/android-touch-pointer-recreate
Android: Fix touch pointer not working after activity recreation
  • Loading branch information
lioncash committed Sep 15, 2020
2 parents 601ff18 + c8a76e6 commit f042251
Showing 1 changed file with 11 additions and 1 deletion.
Expand Up @@ -123,7 +123,17 @@ public InputOverlay(Context context, AttributeSet attrs)
defaultOverlay();

// Load the controls.
refreshControls();
if (NativeLibrary.IsRunning())
{
// We would've needed a refreshControls call here in addition to the initTouchPointer call
// if it wasn't for initTouchPointer calling refreshControls.
initTouchPointer();
}
else
{
// We can't call initTouchPointer yet because it needs the aspect ratio of the running game.
refreshControls();
}

// Set the on touch listener.
setOnTouchListener(this);
Expand Down

0 comments on commit f042251

Please sign in to comment.