mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-22 05:40:01 -06:00
Android: Fix crash when no devices have outputs
Regression from 5171290bdb
.
This commit is contained in:
@ -101,8 +101,8 @@ class AdvancedMappingDialog(
|
||||
return
|
||||
} else if (!isInput) {
|
||||
// Find the first device that has an output. (Most built-in devices don't have any)
|
||||
val deviceWithOutputs = devices.first { deviceHasOutputs(it) }
|
||||
if (deviceWithOutputs.isNotEmpty()) {
|
||||
val deviceWithOutputs = devices.firstOrNull { deviceHasOutputs(it) }
|
||||
if (deviceWithOutputs != null) {
|
||||
setSelectedDevice(deviceWithOutputs)
|
||||
binding.dropdownDevice.setText(deviceWithOutputs, false)
|
||||
return
|
||||
|
Reference in New Issue
Block a user