summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMorph <39850852+Morph1984@users.noreply.github.com>2020-08-28 05:38:26 +0200
committerMorph <39850852+Morph1984@users.noreply.github.com>2020-09-04 18:23:25 +0200
commit371226448a93d0553ded77750eaccbffa4a799e4 (patch)
tree85d13b6716e43d0bae463a6aff409a5ea5b50b5d /src
parentmain: Apply settings after applet configuration is complete. (diff)
downloadyuzu-371226448a93d0553ded77750eaccbffa4a799e4.tar
yuzu-371226448a93d0553ded77750eaccbffa4a799e4.tar.gz
yuzu-371226448a93d0553ded77750eaccbffa4a799e4.tar.bz2
yuzu-371226448a93d0553ded77750eaccbffa4a799e4.tar.lz
yuzu-371226448a93d0553ded77750eaccbffa4a799e4.tar.xz
yuzu-371226448a93d0553ded77750eaccbffa4a799e4.tar.zst
yuzu-371226448a93d0553ded77750eaccbffa4a799e4.zip
Diffstat (limited to '')
-rw-r--r--src/core/frontend/applets/controller.cpp19
1 files changed, 12 insertions, 7 deletions
diff --git a/src/core/frontend/applets/controller.cpp b/src/core/frontend/applets/controller.cpp
index 34eacbb45..715d9fffd 100644
--- a/src/core/frontend/applets/controller.cpp
+++ b/src/core/frontend/applets/controller.cpp
@@ -44,19 +44,24 @@ 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
+ // Pro Controller -> Dual Joycons -> Left Joycon/Right Joycon -> Handheld
if (parameters.allow_pro_controller) {
npad.AddNewControllerAt(
npad.MapSettingsTypeToNPad(Settings::ControllerType::ProController), index);
} else if (parameters.allow_dual_joycons) {
npad.AddNewControllerAt(
npad.MapSettingsTypeToNPad(Settings::ControllerType::DualJoyconDetached), index);
- } else if (parameters.allow_left_joycon) {
- npad.AddNewControllerAt(
- npad.MapSettingsTypeToNPad(Settings::ControllerType::LeftJoycon), index);
- } else if (parameters.allow_right_joycon) {
- npad.AddNewControllerAt(
- npad.MapSettingsTypeToNPad(Settings::ControllerType::RightJoycon), 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);
+ } else {
+ npad.AddNewControllerAt(
+ npad.MapSettingsTypeToNPad(Settings::ControllerType::RightJoycon), index);
+ }
} else if (index == 0 && parameters.enable_single_mode && parameters.allow_handheld &&
!Settings::values.use_docked_mode) {
// We should *never* reach here under any normal circumstances.