diff options
| author | 2020-11-17 20:02:27 -0800 | |
|---|---|---|
| committer | 2020-11-17 20:02:27 -0800 | |
| commit | abda36636245c416a75774165d2a5b49610952fc (patch) | |
| tree | 0bf3bab90e2155a3a16ffa21eabbc2a4c8f9d39d /src/core/frontend/applets/controller.cpp | |
| parent | Merge pull request #4933 from lioncash/nodisc-gpu (diff) | |
| parent | sdl_impl: Pump SDL Events at 1000 Hz (diff) | |
| download | yuzu-abda36636245c416a75774165d2a5b49610952fc.tar.gz yuzu-abda36636245c416a75774165d2a5b49610952fc.tar.xz yuzu-abda36636245c416a75774165d2a5b49610952fc.zip | |
Merge pull request #4866 from Morph1984/mjolnir-p3-prod
Project Mjölnir: Part 3 - Controller Profiles and Vibration Rework
Diffstat (limited to 'src/core/frontend/applets/controller.cpp')
| -rw-r--r-- | src/core/frontend/applets/controller.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/core/frontend/applets/controller.cpp b/src/core/frontend/applets/controller.cpp index 5582091f4..03bbedf8b 100644 --- a/src/core/frontend/applets/controller.cpp +++ b/src/core/frontend/applets/controller.cpp | |||
| @@ -27,19 +27,19 @@ void DefaultControllerApplet::ReconfigureControllers(std::function<void()> callb | |||
| 27 | ->GetAppletResource() | 27 | ->GetAppletResource() |
| 28 | ->GetController<Service::HID::Controller_NPad>(Service::HID::HidController::NPad); | 28 | ->GetController<Service::HID::Controller_NPad>(Service::HID::HidController::NPad); |
| 29 | 29 | ||
| 30 | auto& players = Settings::values.players; | 30 | auto& players = Settings::values.players.GetValue(); |
| 31 | 31 | ||
| 32 | const std::size_t min_supported_players = | 32 | const std::size_t min_supported_players = |
| 33 | parameters.enable_single_mode ? 1 : parameters.min_players; | 33 | parameters.enable_single_mode ? 1 : parameters.min_players; |
| 34 | 34 | ||
| 35 | // Disconnect Handheld first. | 35 | // Disconnect Handheld first. |
| 36 | npad.DisconnectNPadAtIndex(8); | 36 | npad.DisconnectNpadAtIndex(8); |
| 37 | 37 | ||
| 38 | // Deduce the best configuration based on the input parameters. | 38 | // Deduce the best configuration based on the input parameters. |
| 39 | for (std::size_t index = 0; index < players.size() - 2; ++index) { | 39 | for (std::size_t index = 0; index < players.size() - 2; ++index) { |
| 40 | // First, disconnect all controllers regardless of the value of keep_controllers_connected. | 40 | // First, disconnect all controllers regardless of the value of keep_controllers_connected. |
| 41 | // This makes it easy to connect the desired controllers. | 41 | // This makes it easy to connect the desired controllers. |
| 42 | npad.DisconnectNPadAtIndex(index); | 42 | npad.DisconnectNpadAtIndex(index); |
| 43 | 43 | ||
| 44 | // Only connect the minimum number of required players. | 44 | // Only connect the minimum number of required players. |
| 45 | if (index >= min_supported_players) { | 45 | if (index >= min_supported_players) { |
| @@ -66,7 +66,7 @@ void DefaultControllerApplet::ReconfigureControllers(std::function<void()> callb | |||
| 66 | npad.MapSettingsTypeToNPad(Settings::ControllerType::RightJoycon), index); | 66 | npad.MapSettingsTypeToNPad(Settings::ControllerType::RightJoycon), index); |
| 67 | } | 67 | } |
| 68 | } else if (index == 0 && parameters.enable_single_mode && parameters.allow_handheld && | 68 | } else if (index == 0 && parameters.enable_single_mode && parameters.allow_handheld && |
| 69 | !Settings::values.use_docked_mode) { | 69 | !Settings::values.use_docked_mode.GetValue()) { |
| 70 | // We should *never* reach here under any normal circumstances. | 70 | // We should *never* reach here under any normal circumstances. |
| 71 | npad.AddNewControllerAt(npad.MapSettingsTypeToNPad(Settings::ControllerType::Handheld), | 71 | npad.AddNewControllerAt(npad.MapSettingsTypeToNPad(Settings::ControllerType::Handheld), |
| 72 | index); | 72 | index); |