summaryrefslogtreecommitdiff
path: root/src/core/hid/emulated_controller.cpp
diff options
context:
space:
mode:
authorGravatar german772021-10-30 20:16:10 -0500
committerGravatar Narr the Reg2021-11-24 20:30:26 -0600
commit61d9eb9f690d6afe141f24ba75c99b54e122dfa3 (patch)
tree895bee43d85f4013ce9c45e7d89b67e923888246 /src/core/hid/emulated_controller.cpp
parentcore/hid: Explain better what a temporary value does (diff)
downloadyuzu-61d9eb9f690d6afe141f24ba75c99b54e122dfa3.tar.gz
yuzu-61d9eb9f690d6afe141f24ba75c99b54e122dfa3.tar.xz
yuzu-61d9eb9f690d6afe141f24ba75c99b54e122dfa3.zip
input_common: Revert deleted TAS functions
Diffstat (limited to 'src/core/hid/emulated_controller.cpp')
-rw-r--r--src/core/hid/emulated_controller.cpp44
1 files changed, 22 insertions, 22 deletions
diff --git a/src/core/hid/emulated_controller.cpp b/src/core/hid/emulated_controller.cpp
index 3c3fa16d6..69568f4e9 100644
--- a/src/core/hid/emulated_controller.cpp
+++ b/src/core/hid/emulated_controller.cpp
@@ -127,7 +127,7 @@ void EmulatedController::LoadDevices() {
127 // Initialize TAS devices 127 // Initialize TAS devices
128 std::transform(tas_button_params.begin(), tas_button_params.end(), tas_button_devices.begin(), 128 std::transform(tas_button_params.begin(), tas_button_params.end(), tas_button_devices.begin(),
129 Input::CreateDevice<Input::InputDevice>); 129 Input::CreateDevice<Input::InputDevice>);
130 std::transform(tas_stick_params.begin(), tas_stick_params.begin(), tas_stick_devices.begin(), 130 std::transform(tas_stick_params.begin(), tas_stick_params.end(), tas_stick_devices.begin(),
131 Input::CreateDevice<Input::InputDevice>); 131 Input::CreateDevice<Input::InputDevice>);
132} 132}
133 133
@@ -135,7 +135,7 @@ void EmulatedController::LoadTASParams() {
135 const auto player_index = NpadIdTypeToIndex(npad_id_type); 135 const auto player_index = NpadIdTypeToIndex(npad_id_type);
136 Common::ParamPackage common_params{}; 136 Common::ParamPackage common_params{};
137 common_params.Set("engine", "tas"); 137 common_params.Set("engine", "tas");
138 common_params.Set("pad", static_cast<int>(player_index)); 138 common_params.Set("port", static_cast<int>(player_index));
139 for (auto& param : tas_button_params) { 139 for (auto& param : tas_button_params) {
140 param = common_params; 140 param = common_params;
141 } 141 }
@@ -144,26 +144,26 @@ void EmulatedController::LoadTASParams() {
144 } 144 }
145 145
146 // TODO(german77): Replace this with an input profile or something better 146 // TODO(german77): Replace this with an input profile or something better
147 tas_button_params[Settings::NativeButton::A].Set("button", 1 << 0); 147 tas_button_params[Settings::NativeButton::A].Set("button", 0);
148 tas_button_params[Settings::NativeButton::B].Set("button", 1 << 1); 148 tas_button_params[Settings::NativeButton::B].Set("button", 1);
149 tas_button_params[Settings::NativeButton::X].Set("button", 1 << 2); 149 tas_button_params[Settings::NativeButton::X].Set("button", 2);
150 tas_button_params[Settings::NativeButton::Y].Set("button", 1 << 3); 150 tas_button_params[Settings::NativeButton::Y].Set("button", 3);
151 tas_button_params[Settings::NativeButton::LStick].Set("button", 1 << 4); 151 tas_button_params[Settings::NativeButton::LStick].Set("button", 4);
152 tas_button_params[Settings::NativeButton::RStick].Set("button", 1 << 5); 152 tas_button_params[Settings::NativeButton::RStick].Set("button", 5);
153 tas_button_params[Settings::NativeButton::L].Set("button", 1 << 6); 153 tas_button_params[Settings::NativeButton::L].Set("button", 6);
154 tas_button_params[Settings::NativeButton::R].Set("button", 1 << 7); 154 tas_button_params[Settings::NativeButton::R].Set("button", 7);
155 tas_button_params[Settings::NativeButton::ZL].Set("button", 1 << 8); 155 tas_button_params[Settings::NativeButton::ZL].Set("button", 8);
156 tas_button_params[Settings::NativeButton::ZR].Set("button", 1 << 9); 156 tas_button_params[Settings::NativeButton::ZR].Set("button", 9);
157 tas_button_params[Settings::NativeButton::Plus].Set("button", 1 << 10); 157 tas_button_params[Settings::NativeButton::Plus].Set("button", 10);
158 tas_button_params[Settings::NativeButton::Minus].Set("button", 1 << 11); 158 tas_button_params[Settings::NativeButton::Minus].Set("button", 11);
159 tas_button_params[Settings::NativeButton::DLeft].Set("button", 1 << 12); 159 tas_button_params[Settings::NativeButton::DLeft].Set("button", 12);
160 tas_button_params[Settings::NativeButton::DUp].Set("button", 1 << 13); 160 tas_button_params[Settings::NativeButton::DUp].Set("button", 13);
161 tas_button_params[Settings::NativeButton::DRight].Set("button", 1 << 14); 161 tas_button_params[Settings::NativeButton::DRight].Set("button", 14);
162 tas_button_params[Settings::NativeButton::DDown].Set("button", 1 << 15); 162 tas_button_params[Settings::NativeButton::DDown].Set("button", 15);
163 tas_button_params[Settings::NativeButton::SL].Set("button", 1 << 16); 163 tas_button_params[Settings::NativeButton::SL].Set("button", 16);
164 tas_button_params[Settings::NativeButton::SR].Set("button", 1 << 17); 164 tas_button_params[Settings::NativeButton::SR].Set("button", 17);
165 tas_button_params[Settings::NativeButton::Home].Set("button", 1 << 18); 165 tas_button_params[Settings::NativeButton::Home].Set("button", 18);
166 tas_button_params[Settings::NativeButton::Screenshot].Set("button", 1 << 19); 166 tas_button_params[Settings::NativeButton::Screenshot].Set("button", 19);
167 167
168 tas_stick_params[Settings::NativeAnalog::LStick].Set("axis_x", 0); 168 tas_stick_params[Settings::NativeAnalog::LStick].Set("axis_x", 0);
169 tas_stick_params[Settings::NativeAnalog::LStick].Set("axis_y", 1); 169 tas_stick_params[Settings::NativeAnalog::LStick].Set("axis_y", 1);