diff options
author | german77 <juangerman-13@hotmail.com> | 2021-10-21 00:53:14 +0200 |
---|---|---|
committer | Narr the Reg <juangerman-13@hotmail.com> | 2021-11-25 03:30:25 +0100 |
commit | af55dd193533be577d0a3d01f93a4a3a2c27cd5d (patch) | |
tree | c9fa35290dbf470a7940b3b22249c948970b714c /src/core/hle | |
parent | core/hid: Fix rumble too strong at 1% (diff) | |
download | yuzu-af55dd193533be577d0a3d01f93a4a3a2c27cd5d.tar yuzu-af55dd193533be577d0a3d01f93a4a3a2c27cd5d.tar.gz yuzu-af55dd193533be577d0a3d01f93a4a3a2c27cd5d.tar.bz2 yuzu-af55dd193533be577d0a3d01f93a4a3a2c27cd5d.tar.lz yuzu-af55dd193533be577d0a3d01f93a4a3a2c27cd5d.tar.xz yuzu-af55dd193533be577d0a3d01f93a4a3a2c27cd5d.tar.zst yuzu-af55dd193533be577d0a3d01f93a4a3a2c27cd5d.zip |
Diffstat (limited to 'src/core/hle')
-rw-r--r-- | src/core/hle/service/am/applets/applet_controller.cpp | 14 |
1 files changed, 3 insertions, 11 deletions
diff --git a/src/core/hle/service/am/applets/applet_controller.cpp b/src/core/hle/service/am/applets/applet_controller.cpp index c1b6cd126..658265a00 100644 --- a/src/core/hle/service/am/applets/applet_controller.cpp +++ b/src/core/hle/service/am/applets/applet_controller.cpp @@ -243,19 +243,11 @@ void Controller::Execute() { void Controller::ConfigurationComplete() { ControllerSupportResultInfo result_info{}; - const auto& players = Settings::values.players.GetValue(); - // 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, - [](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.player_count = is_single_mode ? 1 : system.HIDCore().GetPlayerCount(); + + result_info.selected_id = static_cast<u32>(system.HIDCore().GetFirstNpadId()); result_info.result = 0; |