mirror of
https://github.com/starr-dusT/yuzu-mainline
synced 2024-03-05 21:12:25 -08:00
Merge pull request #11940 from t895/controller-null-check
android: Default to player number 0 if we get an input from an unreco…
This commit is contained in:
commit
7b10ceda02
@ -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.
|
||||||
|
Loading…
Reference in New Issue
Block a user