aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorCharles Lombardo <[email protected]>2024-02-19 16:47:21 -0500
committerGitHub <[email protected]>2024-02-19 22:47:21 +0100
commitf567a41f53cae875a7912709b0d832b7c4e99f0f (patch)
tree13b374b8f941e10dd44ddec4d913ea7e87916a7e
parent8d5473e67c202768673d4d9f3e59df50501f30e4 (diff)
downloadyuzu-mainline-f567a41f53cae875a7912709b0d832b7c4e99f0f.tar.gz
yuzu-mainline-f567a41f53cae875a7912709b0d832b7c4e99f0f.zip
android: Have input overlay follow player 1 style index (#13085)
-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
import org.yuzu.yuzu_emu.R
import org.yuzu.yuzu_emu.features.input.model.NativeAnalog
import org.yuzu.yuzu_emu.features.input.model.NativeButton
+import org.yuzu.yuzu_emu.features.input.model.NpadStyleIndex
import org.yuzu.yuzu_emu.features.settings.model.BooleanSetting
import org.yuzu.yuzu_emu.features.settings.model.IntSetting
import org.yuzu.yuzu_emu.overlay.model.OverlayControl
@@ -99,12 +100,10 @@ class InputOverlay(context: Context, attrs: AttributeSet?) :
}
var shouldUpdateView = false
- val playerIndex =
- if (NativeInput.isHandheldOnly()) {
- NativeInput.ConsoleDevice
- } else {
- NativeInput.Player1Device
- }
+ val playerIndex = when (NativeInput.getStyleIndex(0)) {
+ NpadStyleIndex.Handheld -> 8
+ else -> 0
+ }
for (button in overlayButtons) {
if (!button.updateStatus(event)) {