Skip to content

VERY experimental Nintendo Switch 2 emulator

C++

core/hid: Fix faulty analog triggers

Narr the Reg3e0a577553f6
diff --git a/src/core/hid/emulated_controller.cpp b/src/core/hid/emulated_controller.cpp
index eb2e0ab4f9..93372445b2 100644
--- a/src/core/hid/emulated_controller.cpp
+++ b/src/core/hid/emulated_controller.cpp
@@ -670,7 +670,7 @@ void EmulatedController::SetTrigger(const Common::Input::CallbackStatus& callbac
const auto trigger_value = TransformToTrigger(callback);
// Only read trigger values that have the same uuid or are pressed once
- if (controller.stick_values[index].uuid != uuid) {
+ if (controller.trigger_values[index].uuid != uuid) {
if (!trigger_value.pressed.value) {
return;
}
@@ -686,7 +686,7 @@ void EmulatedController::SetTrigger(const Common::Input::CallbackStatus& callbac
return;
}
- const auto trigger = controller.trigger_values[index];
+ const auto& trigger = controller.trigger_values[index];
switch (index) {
case Settings::NativeTrigger::LTrigger: