summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar FearlessTobi2020-04-05 07:14:35 +0200
committerGravatar FearlessTobi2020-04-05 07:14:35 +0200
commitfb8afee077d72d27183af1c3843f4e16c647308c (patch)
tree85f9eee82622f4067d60c176ce94dbd611c3dde8
parentci: Update to Windows Server 2019 and Visual Studio 2019 (diff)
downloadyuzu-fb8afee077d72d27183af1c3843f4e16c647308c.tar.gz
yuzu-fb8afee077d72d27183af1c3843f4e16c647308c.tar.xz
yuzu-fb8afee077d72d27183af1c3843f4e16c647308c.zip
yuzu/configure_input_simple: Fix "Docked Joycons" controller profile
This was incorrectly using PlayerIndex 1 when calling the ConfigureDialog.
-rw-r--r--src/yuzu/configuration/configure_input_simple.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/yuzu/configuration/configure_input_simple.cpp b/src/yuzu/configuration/configure_input_simple.cpp
index ab3a11d30..0e0e8f113 100644
--- a/src/yuzu/configuration/configure_input_simple.cpp
+++ b/src/yuzu/configuration/configure_input_simple.cpp
@@ -35,6 +35,7 @@ void CallConfigureDialog(ConfigureInputSimple* caller, Args&&... args) {
35// - Open any dialogs 35// - Open any dialogs
36// - Block in any way 36// - Block in any way
37 37
38constexpr std::size_t PLAYER_0_INDEX = 0;
38constexpr std::size_t HANDHELD_INDEX = 8; 39constexpr std::size_t HANDHELD_INDEX = 8;
39 40
40void HandheldOnProfileSelect() { 41void HandheldOnProfileSelect() {
@@ -53,8 +54,8 @@ void HandheldOnProfileSelect() {
53} 54}
54 55
55void DualJoyconsDockedOnProfileSelect() { 56void DualJoyconsDockedOnProfileSelect() {
56 Settings::values.players[0].connected = true; 57 Settings::values.players[PLAYER_0_INDEX].connected = true;
57 Settings::values.players[0].type = Settings::ControllerType::DualJoycon; 58 Settings::values.players[PLAYER_0_INDEX].type = Settings::ControllerType::DualJoycon;
58 59
59 for (std::size_t player = 1; player <= HANDHELD_INDEX; ++player) { 60 for (std::size_t player = 1; player <= HANDHELD_INDEX; ++player) {
60 Settings::values.players[player].connected = false; 61 Settings::values.players[player].connected = false;
@@ -64,7 +65,7 @@ void DualJoyconsDockedOnProfileSelect() {
64 Settings::values.keyboard_enabled = false; 65 Settings::values.keyboard_enabled = false;
65 Settings::values.mouse_enabled = false; 66 Settings::values.mouse_enabled = false;
66 Settings::values.debug_pad_enabled = false; 67 Settings::values.debug_pad_enabled = false;
67 Settings::values.touchscreen.enabled = false; 68 Settings::values.touchscreen.enabled = true;
68} 69}
69 70
70// Name, OnProfileSelect (called when selected in drop down), OnConfigure (called when configure 71// Name, OnProfileSelect (called when selected in drop down), OnConfigure (called when configure
@@ -78,7 +79,7 @@ constexpr std::array<InputProfile, 3> INPUT_PROFILES{{
78 }}, 79 }},
79 {QT_TR_NOOP("Single Player - Dual Joycons - Docked"), DualJoyconsDockedOnProfileSelect, 80 {QT_TR_NOOP("Single Player - Dual Joycons - Docked"), DualJoyconsDockedOnProfileSelect,
80 [](ConfigureInputSimple* caller) { 81 [](ConfigureInputSimple* caller) {
81 CallConfigureDialog<ConfigureInputPlayer>(caller, 1, false); 82 CallConfigureDialog<ConfigureInputPlayer>(caller, PLAYER_0_INDEX, false);
82 }}, 83 }},
83 {QT_TR_NOOP("Custom"), [] {}, CallConfigureDialog<ConfigureInput>}, 84 {QT_TR_NOOP("Custom"), [] {}, CallConfigureDialog<ConfigureInput>},
84}}; 85}};