summaryrefslogtreecommitdiffstats
path: root/src/core/hle
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/hle')
-rw-r--r--src/core/hle/service/am/applets/controller.cpp17
1 files changed, 8 insertions, 9 deletions
diff --git a/src/core/hle/service/am/applets/controller.cpp b/src/core/hle/service/am/applets/controller.cpp
index e8ea4248b..2504cac32 100644
--- a/src/core/hle/service/am/applets/controller.cpp
+++ b/src/core/hle/service/am/applets/controller.cpp
@@ -227,15 +227,14 @@ void Controller::ConfigurationComplete() {
// If enable_single_mode is enabled, player_count is 1 regardless of any other parameters.
// Otherwise, only count connected players from P1-P8.
result_info.player_count =
- is_single_mode ? 1
- : static_cast<s8>(std::count_if(
- players.begin(), players.end() - 2,
- [](Settings::PlayerInput player) { return player.connected; }));
-
- result_info.selected_id = HID::Controller_NPad::IndexToNPad(
- std::distance(players.begin(),
- std::find_if(players.begin(), players.end(),
- [](Settings::PlayerInput player) { return player.connected; })));
+ is_single_mode
+ ? 1
+ : static_cast<s8>(std::count_if(players.begin(), players.end() - 2,
+ [](const auto& player) { return player.connected; }));
+
+ result_info.selected_id = HID::Controller_NPad::IndexToNPad(std::distance(
+ players.begin(), std::find_if(players.begin(), players.end(),
+ [](const auto& player) { return player.connected; })));
result_info.result = 0;