diff options
| author | 2021-12-29 22:15:08 -0600 | |
|---|---|---|
| committer | 2021-12-29 22:51:53 -0600 | |
| commit | 9ee5c4ec5629c185d29dd41468047004acef2e29 (patch) | |
| tree | 997dd6a3916e3bd84cf5a109421d18f72d678fc4 /src/core/frontend/applets/controller.cpp | |
| parent | Merge pull request #7620 from bunnei/kernel-thread-x18 (diff) | |
| download | yuzu-9ee5c4ec5629c185d29dd41468047004acef2e29.tar.gz yuzu-9ee5c4ec5629c185d29dd41468047004acef2e29.tar.xz yuzu-9ee5c4ec5629c185d29dd41468047004acef2e29.zip | |
core/hid: Fix controller type validation
Diffstat (limited to 'src/core/frontend/applets/controller.cpp')
| -rw-r--r-- | src/core/frontend/applets/controller.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/core/frontend/applets/controller.cpp b/src/core/frontend/applets/controller.cpp index 6dbd38ffa..e1033b634 100644 --- a/src/core/frontend/applets/controller.cpp +++ b/src/core/frontend/applets/controller.cpp | |||
| @@ -45,26 +45,26 @@ void DefaultControllerApplet::ReconfigureControllers(std::function<void()> callb | |||
| 45 | // Pro Controller -> Dual Joycons -> Left Joycon/Right Joycon -> Handheld | 45 | // Pro Controller -> Dual Joycons -> Left Joycon/Right Joycon -> Handheld |
| 46 | if (parameters.allow_pro_controller) { | 46 | if (parameters.allow_pro_controller) { |
| 47 | controller->SetNpadStyleIndex(Core::HID::NpadStyleIndex::ProController); | 47 | controller->SetNpadStyleIndex(Core::HID::NpadStyleIndex::ProController); |
| 48 | controller->Connect(); | 48 | controller->Connect(true); |
| 49 | } else if (parameters.allow_dual_joycons) { | 49 | } else if (parameters.allow_dual_joycons) { |
| 50 | controller->SetNpadStyleIndex(Core::HID::NpadStyleIndex::JoyconDual); | 50 | controller->SetNpadStyleIndex(Core::HID::NpadStyleIndex::JoyconDual); |
| 51 | controller->Connect(); | 51 | controller->Connect(true); |
| 52 | } else if (parameters.allow_left_joycon && parameters.allow_right_joycon) { | 52 | } else if (parameters.allow_left_joycon && parameters.allow_right_joycon) { |
| 53 | // Assign left joycons to even player indices and right joycons to odd player indices. | 53 | // Assign left joycons to even player indices and right joycons to odd player indices. |
| 54 | // We do this since Captain Toad Treasure Tracker expects a left joycon for Player 1 and | 54 | // We do this since Captain Toad Treasure Tracker expects a left joycon for Player 1 and |
| 55 | // a right Joycon for Player 2 in 2 Player Assist mode. | 55 | // a right Joycon for Player 2 in 2 Player Assist mode. |
| 56 | if (index % 2 == 0) { | 56 | if (index % 2 == 0) { |
| 57 | controller->SetNpadStyleIndex(Core::HID::NpadStyleIndex::JoyconLeft); | 57 | controller->SetNpadStyleIndex(Core::HID::NpadStyleIndex::JoyconLeft); |
| 58 | controller->Connect(); | 58 | controller->Connect(true); |
| 59 | } else { | 59 | } else { |
| 60 | controller->SetNpadStyleIndex(Core::HID::NpadStyleIndex::JoyconRight); | 60 | controller->SetNpadStyleIndex(Core::HID::NpadStyleIndex::JoyconRight); |
| 61 | controller->Connect(); | 61 | controller->Connect(true); |
| 62 | } | 62 | } |
| 63 | } else if (index == 0 && parameters.enable_single_mode && parameters.allow_handheld && | 63 | } else if (index == 0 && parameters.enable_single_mode && parameters.allow_handheld && |
| 64 | !Settings::values.use_docked_mode.GetValue()) { | 64 | !Settings::values.use_docked_mode.GetValue()) { |
| 65 | // We should *never* reach here under any normal circumstances. | 65 | // We should *never* reach here under any normal circumstances. |
| 66 | controller->SetNpadStyleIndex(Core::HID::NpadStyleIndex::Handheld); | 66 | controller->SetNpadStyleIndex(Core::HID::NpadStyleIndex::Handheld); |
| 67 | controller->Connect(); | 67 | controller->Connect(true); |
| 68 | } else { | 68 | } else { |
| 69 | UNREACHABLE_MSG("Unable to add a new controller based on the given parameters!"); | 69 | UNREACHABLE_MSG("Unable to add a new controller based on the given parameters!"); |
| 70 | } | 70 | } |