Merge pull request #7583 from german77/triggered

core/hid: Fix faulty analog triggers
This commit is contained in:
Ghost 2021-12-14 22:48:53 -05:00 committed by GitHub
commit 935fee18ed
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -670,7 +670,7 @@ void EmulatedController::SetTrigger(const Common::Input::CallbackStatus& callbac
const auto trigger_value = TransformToTrigger(callback); const auto trigger_value = TransformToTrigger(callback);
// Only read trigger values that have the same uuid or are pressed once // 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) { if (!trigger_value.pressed.value) {
return; return;
} }
@ -686,7 +686,7 @@ void EmulatedController::SetTrigger(const Common::Input::CallbackStatus& callbac
return; return;
} }
const auto trigger = controller.trigger_values[index]; const auto& trigger = controller.trigger_values[index];
switch (index) { switch (index) {
case Settings::NativeTrigger::LTrigger: case Settings::NativeTrigger::LTrigger: