aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/frontend
diff options
context:
space:
mode:
authorgerman77 <[email protected]>2021-09-20 20:46:17 -0500
committerNarr the Reg <[email protected]>2021-11-24 20:30:24 -0600
commit510c7d29537f4d17ec5751b981729e1bf66fe44c (patch)
tree70f9f3fb3eff0add73810186c764da90c4d14677 /src/core/frontend
parentdd62a0187d2f8208e288528a7cbf01810bfed20a (diff)
downloadyuzu-mainline-510c7d29537f4d17ec5751b981729e1bf66fe44c.tar.gz
yuzu-mainline-510c7d29537f4d17ec5751b981729e1bf66fe44c.zip
core/frontend: Update applets
Diffstat (limited to 'src/core/frontend')
-rw-r--r--src/core/frontend/applets/controller.cpp23
1 files changed, 14 insertions, 9 deletions
diff --git a/src/core/frontend/applets/controller.cpp b/src/core/frontend/applets/controller.cpp
index 03bbedf8b..ca1edce15 100644
--- a/src/core/frontend/applets/controller.cpp
+++ b/src/core/frontend/applets/controller.cpp
@@ -49,26 +49,31 @@ void DefaultControllerApplet::ReconfigureControllers(std::function<void()> callb
// Connect controllers based on the following priority list from highest to lowest priority:
// Pro Controller -> Dual Joycons -> Left Joycon/Right Joycon -> Handheld
if (parameters.allow_pro_controller) {
- npad.AddNewControllerAt(
- npad.MapSettingsTypeToNPad(Settings::ControllerType::ProController), index);
+ npad.AddNewControllerAt(Core::HID::EmulatedController::MapSettingsTypeToNPad(
+ Settings::ControllerType::ProController),
+ index);
} else if (parameters.allow_dual_joycons) {
- npad.AddNewControllerAt(
- npad.MapSettingsTypeToNPad(Settings::ControllerType::DualJoyconDetached), index);
+ npad.AddNewControllerAt(Core::HID::EmulatedController::MapSettingsTypeToNPad(
+ Settings::ControllerType::DualJoyconDetached),
+ index);
} else if (parameters.allow_left_joycon && parameters.allow_right_joycon) {
// Assign left joycons to even player indices and right joycons to odd player indices.
// We do this since Captain Toad Treasure Tracker expects a left joycon for Player 1 and
// a right Joycon for Player 2 in 2 Player Assist mode.
if (index % 2 == 0) {
- npad.AddNewControllerAt(
- npad.MapSettingsTypeToNPad(Settings::ControllerType::LeftJoycon), index);
+ npad.AddNewControllerAt(Core::HID::EmulatedController::MapSettingsTypeToNPad(
+ Settings::ControllerType::LeftJoycon),
+ index);
} else {
- npad.AddNewControllerAt(
- npad.MapSettingsTypeToNPad(Settings::ControllerType::RightJoycon), index);
+ npad.AddNewControllerAt(Core::HID::EmulatedController::MapSettingsTypeToNPad(
+ Settings::ControllerType::RightJoycon),
+ index);
}
} else if (index == 0 && parameters.enable_single_mode && parameters.allow_handheld &&
!Settings::values.use_docked_mode.GetValue()) {
// We should *never* reach here under any normal circumstances.
- npad.AddNewControllerAt(npad.MapSettingsTypeToNPad(Settings::ControllerType::Handheld),
+ npad.AddNewControllerAt(Core::HID::EmulatedController::MapSettingsTypeToNPad(
+ Settings::ControllerType::Handheld),
index);
} else {
UNREACHABLE_MSG("Unable to add a new controller based on the given parameters!");