summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGravatar Charles Lombardo2024-02-19 16:47:21 -0500
committerGravatar GitHub2024-02-19 22:47:21 +0100
commitf567a41f53cae875a7912709b0d832b7c4e99f0f (patch)
tree13b374b8f941e10dd44ddec4d913ea7e87916a7e /src
parentMerge pull request #13031 from german77/btm-interfcae (diff)
downloadyuzu-f567a41f53cae875a7912709b0d832b7c4e99f0f.tar.gz
yuzu-f567a41f53cae875a7912709b0d832b7c4e99f0f.tar.xz
yuzu-f567a41f53cae875a7912709b0d832b7c4e99f0f.zip
android: Have input overlay follow player 1 style index (#13085)
Diffstat (limited to 'src')
-rw-r--r--src/android/app/src/main/java/org/yuzu/yuzu_emu/overlay/InputOverlay.kt11
1 files changed, 5 insertions, 6 deletions
diff --git a/src/android/app/src/main/java/org/yuzu/yuzu_emu/overlay/InputOverlay.kt b/src/android/app/src/main/java/org/yuzu/yuzu_emu/overlay/InputOverlay.kt
index ed112a38d..737e03584 100644
--- a/src/android/app/src/main/java/org/yuzu/yuzu_emu/overlay/InputOverlay.kt
+++ b/src/android/app/src/main/java/org/yuzu/yuzu_emu/overlay/InputOverlay.kt
@@ -28,6 +28,7 @@ import org.yuzu.yuzu_emu.features.input.NativeInput
28import org.yuzu.yuzu_emu.R 28import org.yuzu.yuzu_emu.R
29import org.yuzu.yuzu_emu.features.input.model.NativeAnalog 29import org.yuzu.yuzu_emu.features.input.model.NativeAnalog
30import org.yuzu.yuzu_emu.features.input.model.NativeButton 30import org.yuzu.yuzu_emu.features.input.model.NativeButton
31import org.yuzu.yuzu_emu.features.input.model.NpadStyleIndex
31import org.yuzu.yuzu_emu.features.settings.model.BooleanSetting 32import org.yuzu.yuzu_emu.features.settings.model.BooleanSetting
32import org.yuzu.yuzu_emu.features.settings.model.IntSetting 33import org.yuzu.yuzu_emu.features.settings.model.IntSetting
33import org.yuzu.yuzu_emu.overlay.model.OverlayControl 34import org.yuzu.yuzu_emu.overlay.model.OverlayControl
@@ -99,12 +100,10 @@ class InputOverlay(context: Context, attrs: AttributeSet?) :
99 } 100 }
100 101
101 var shouldUpdateView = false 102 var shouldUpdateView = false
102 val playerIndex = 103 val playerIndex = when (NativeInput.getStyleIndex(0)) {
103 if (NativeInput.isHandheldOnly()) { 104 NpadStyleIndex.Handheld -> 8
104 NativeInput.ConsoleDevice 105 else -> 0
105 } else { 106 }
106 NativeInput.Player1Device
107 }
108 107
109 for (button in overlayButtons) { 108 for (button in overlayButtons) {
110 if (!button.updateStatus(event)) { 109 if (!button.updateStatus(event)) {