diff options
Diffstat (limited to '')
-rw-r--r-- | src/core/hle/service/am/am.cpp | 2 | ||||
-rw-r--r-- | src/core/hle/service/am/applets/controller.cpp | 26 |
2 files changed, 14 insertions, 14 deletions
diff --git a/src/core/hle/service/am/am.cpp b/src/core/hle/service/am/am.cpp index 995b7e5c6..d7a81f64a 100644 --- a/src/core/hle/service/am/am.cpp +++ b/src/core/hle/service/am/am.cpp @@ -1311,7 +1311,7 @@ void IApplicationFunctions::PopLaunchParameter(Kernel::HLERequestContext& ctx) { params.is_account_selected = 1; Account::ProfileManager profile_manager{}; - const auto uuid = profile_manager.GetUser(static_cast<u32>(Settings::values.current_user)); + const auto uuid = profile_manager.GetUser(Settings::values.current_user); ASSERT(uuid); params.current_user = uuid->uuid; diff --git a/src/core/hle/service/am/applets/controller.cpp b/src/core/hle/service/am/applets/controller.cpp index 17788d7a5..2151da783 100644 --- a/src/core/hle/service/am/applets/controller.cpp +++ b/src/core/hle/service/am/applets/controller.cpp @@ -178,23 +178,23 @@ void Controller::Execute() { } void Controller::ConfigurationComplete() { - const auto& players = Settings::values.players; - - const s8 player_count = - is_single_mode - ? 1 - : static_cast<s8>(std::count_if(players.begin(), players.end() - 2, - [](const auto& player) { return player.connected; })); + ControllerSupportResultInfo result_info{}; - const auto index = static_cast<u32>(std::distance( - players.begin(), std::find_if(players.begin(), players.end(), - [](const auto& player) { return player.connected; }))); + const auto& players = Settings::values.players; // If enable_single_mode is enabled, player_count is 1 regardless of any other parameters. // Otherwise, only count connected players from P1-P8. - ControllerSupportResultInfo result_info{}; - result_info.player_count = player_count; - result_info.selected_id = HID::Controller_NPad::IndexToNPad(index); + 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; }))); + result_info.result = 0; LOG_DEBUG(Service_HID, "Result Info: player_count={}, selected_id={}, result={}", |