diff options
| author | liamwhite <liamwhite@users.noreply.github.com> | 2023-11-01 13:50:50 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-11-01 13:50:50 -0400 |
| commit | f1977f76388787311d7a2feb1810f4c021109c4e (patch) | |
| tree | aced1419f58e63bebbcbf939b6929f827fa7b37d /src | |
| parent | 6a2225132eadf84a42609ce40deed4004dd2658d (diff) | |
| parent | 2befdba713a26c8fb040b17e63462b82f8a5df5d (diff) | |
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.kt | 2 |
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 fc6a8b5cb7..47bde5081e 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 { private fun getPlayerNumber(index: Int, deviceId: Int = -1): Int { var deviceIndex = index if (deviceId != -1) { - deviceIndex = controllerIds[deviceId]!! + deviceIndex = controllerIds[deviceId] ?: 0 } // TODO: Joycons are handled as different controllers. Find a way to merge them. |
