summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGravatar liamwhite2023-11-01 13:50:50 -0400
committerGravatar GitHub2023-11-01 13:50:50 -0400
commit7b10ceda025c81171761b0de442f23030db6b95f (patch)
treeaced1419f58e63bebbcbf939b6929f827fa7b37d /src
parentMerge pull request #11937 from t895/reorganize-options (diff)
parentandroid: Default to player number 0 if we get an input from an unrecognized c... (diff)
downloadyuzu-7b10ceda025c81171761b0de442f23030db6b95f.tar.gz
yuzu-7b10ceda025c81171761b0de442f23030db6b95f.tar.xz
yuzu-7b10ceda025c81171761b0de442f23030db6b95f.zip
Merge pull request #11940 from t895/controller-null-check
android: Default to player number 0 if we get an input from an unreco…
Diffstat (limited to 'src')
-rw-r--r--src/android/app/src/main/java/org/yuzu/yuzu_emu/utils/InputHandler.kt2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/android/app/src/main/java/org/yuzu/yuzu_emu/utils/InputHandler.kt b/src/android/app/src/main/java/org/yuzu/yuzu_emu/utils/InputHandler.kt
index fc6a8b5cb..47bde5081 100644
--- a/src/android/app/src/main/java/org/yuzu/yuzu_emu/utils/InputHandler.kt
+++ b/src/android/app/src/main/java/org/yuzu/yuzu_emu/utils/InputHandler.kt
@@ -68,7 +68,7 @@ object InputHandler {
68 private fun getPlayerNumber(index: Int, deviceId: Int = -1): Int { 68 private fun getPlayerNumber(index: Int, deviceId: Int = -1): Int {
69 var deviceIndex = index 69 var deviceIndex = index
70 if (deviceId != -1) { 70 if (deviceId != -1) {
71 deviceIndex = controllerIds[deviceId]!! 71 deviceIndex = controllerIds[deviceId] ?: 0
72 } 72 }
73 73
74 // TODO: Joycons are handled as different controllers. Find a way to merge them. 74 // TODO: Joycons are handled as different controllers. Find a way to merge them.