diff options
| author | 2021-11-04 12:08:54 -0600 | |
|---|---|---|
| committer | 2021-11-24 20:30:27 -0600 | |
| commit | 5d0f3540c4b085103afa27d6120ea29e0324a5a2 (patch) | |
| tree | 9cdfe756391969476385d3f391d74a6e75aa5889 /src/core/frontend/applets/controller.cpp | |
| parent | config: Cleanup and documentation (diff) | |
| download | yuzu-5d0f3540c4b085103afa27d6120ea29e0324a5a2.tar.gz yuzu-5d0f3540c4b085103afa27d6120ea29e0324a5a2.tar.xz yuzu-5d0f3540c4b085103afa27d6120ea29e0324a5a2.zip | |
core/hid: Rename NpadType to NpadStyleIndex
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 212ace892..6dbd38ffa 100644 --- a/src/core/frontend/applets/controller.cpp +++ b/src/core/frontend/applets/controller.cpp | |||
| @@ -44,26 +44,26 @@ void DefaultControllerApplet::ReconfigureControllers(std::function<void()> callb | |||
| 44 | // Connect controllers based on the following priority list from highest to lowest priority: | 44 | // Connect controllers based on the following priority list from highest to lowest priority: |
| 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->SetNpadType(Core::HID::NpadType::ProController); | 47 | controller->SetNpadStyleIndex(Core::HID::NpadStyleIndex::ProController); |
| 48 | controller->Connect(); | 48 | controller->Connect(); |
| 49 | } else if (parameters.allow_dual_joycons) { | 49 | } else if (parameters.allow_dual_joycons) { |
| 50 | controller->SetNpadType(Core::HID::NpadType::JoyconDual); | 50 | controller->SetNpadStyleIndex(Core::HID::NpadStyleIndex::JoyconDual); |
| 51 | controller->Connect(); | 51 | controller->Connect(); |
| 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->SetNpadType(Core::HID::NpadType::JoyconLeft); | 57 | controller->SetNpadStyleIndex(Core::HID::NpadStyleIndex::JoyconLeft); |
| 58 | controller->Connect(); | 58 | controller->Connect(); |
| 59 | } else { | 59 | } else { |
| 60 | controller->SetNpadType(Core::HID::NpadType::JoyconRight); | 60 | controller->SetNpadStyleIndex(Core::HID::NpadStyleIndex::JoyconRight); |
| 61 | controller->Connect(); | 61 | controller->Connect(); |
| 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->SetNpadType(Core::HID::NpadType::Handheld); | 66 | controller->SetNpadStyleIndex(Core::HID::NpadStyleIndex::Handheld); |
| 67 | controller->Connect(); | 67 | controller->Connect(); |
| 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!"); |