summaryrefslogtreecommitdiff
path: root/Source/Android/app/src/main
diff options
context:
space:
mode:
authorLC <mathew1800@gmail.com>2020-09-15 04:58:41 -0400
committerGitHub <noreply@github.com>2020-09-15 04:58:41 -0400
commitf0422512e6a727e8097a3b556ea59cee245bd7d8 (patch)
treef45a6d1c8eb8c09065f00832649b3c4ee12b4247 /Source/Android/app/src/main
parent601ff182db91ba699c701538e9d72bdc5de79e76 (diff)
parentc8a76e6928e544a4a5be13ede6157913db047d19 (diff)
Merge pull request #9082 from JosJuice/android-touch-pointer-recreate
Android: Fix touch pointer not working after activity recreation
Diffstat (limited to 'Source/Android/app/src/main')
-rw-r--r--Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/overlay/InputOverlay.java12
1 files changed, 11 insertions, 1 deletions
diff --git a/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/overlay/InputOverlay.java b/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/overlay/InputOverlay.java
index ea1a6ecb54..f4878168ca 100644
--- a/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/overlay/InputOverlay.java
+++ b/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/overlay/InputOverlay.java
@@ -123,7 +123,17 @@ public final class InputOverlay extends SurfaceView implements OnTouchListener
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);