diff --git a/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/features/input/ui/AdvancedMappingDialog.kt b/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/features/input/ui/AdvancedMappingDialog.kt index 72d08c26aa..d390601667 100644 --- a/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/features/input/ui/AdvancedMappingDialog.kt +++ b/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/features/input/ui/AdvancedMappingDialog.kt @@ -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