Skip to content
Snippets Groups Projects
Unverified Commit 7b10ceda authored by liamwhite's avatar liamwhite Committed by GitHub
Browse files

Merge pull request #11940 from t895/controller-null-check

android: Default to player number 0 if we get an input from an unreco…
parents 48f913b6 344162db
No related branches found
No related tags found
No related merge requests found
...@@ -68,7 +68,7 @@ object InputHandler { ...@@ -68,7 +68,7 @@ object InputHandler {
private fun getPlayerNumber(index: Int, deviceId: Int = -1): Int { private fun getPlayerNumber(index: Int, deviceId: Int = -1): Int {
var deviceIndex = index var deviceIndex = index
if (deviceId != -1) { if (deviceId != -1) {
deviceIndex = controllerIds[deviceId]!! deviceIndex = controllerIds[deviceId] ?: 0
} }
// TODO: Joycons are handled as different controllers. Find a way to merge them. // TODO: Joycons are handled as different controllers. Find a way to merge them.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment