diff options
| author | 2022-09-20 11:56:43 +0800 | |
|---|---|---|
| committer | 2022-09-20 11:56:43 +0800 | |
| commit | c864cb57726e76e9dc4558036f3212168bec825d (patch) | |
| tree | ca79c4397f40990488a7b5691e15c0fcfec507b6 /src/core/hid/emulated_controller.cpp | |
| parent | video_core: Generate mipmap texture by drawing (diff) | |
| parent | Merge pull request #8849 from Morph1984/parallel-astc (diff) | |
| download | yuzu-c864cb57726e76e9dc4558036f3212168bec825d.tar.gz yuzu-c864cb57726e76e9dc4558036f3212168bec825d.tar.xz yuzu-c864cb57726e76e9dc4558036f3212168bec825d.zip | |
Merge branch 'master' into mipmap
Diffstat (limited to 'src/core/hid/emulated_controller.cpp')
| -rw-r--r-- | src/core/hid/emulated_controller.cpp | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/core/hid/emulated_controller.cpp b/src/core/hid/emulated_controller.cpp index f9f902c2d..01c43be93 100644 --- a/src/core/hid/emulated_controller.cpp +++ b/src/core/hid/emulated_controller.cpp | |||
| @@ -562,6 +562,16 @@ void EmulatedController::SetButton(const Common::Input::CallbackStatus& callback | |||
| 562 | return; | 562 | return; |
| 563 | } | 563 | } |
| 564 | 564 | ||
| 565 | // GC controllers have triggers not buttons | ||
| 566 | if (npad_type == NpadStyleIndex::GameCube) { | ||
| 567 | if (index == Settings::NativeButton::ZR) { | ||
| 568 | return; | ||
| 569 | } | ||
| 570 | if (index == Settings::NativeButton::ZL) { | ||
| 571 | return; | ||
| 572 | } | ||
| 573 | } | ||
| 574 | |||
| 565 | switch (index) { | 575 | switch (index) { |
| 566 | case Settings::NativeButton::A: | 576 | case Settings::NativeButton::A: |
| 567 | controller.npad_button_state.a.Assign(current_status.value); | 577 | controller.npad_button_state.a.Assign(current_status.value); |
| @@ -738,6 +748,11 @@ void EmulatedController::SetTrigger(const Common::Input::CallbackStatus& callbac | |||
| 738 | return; | 748 | return; |
| 739 | } | 749 | } |
| 740 | 750 | ||
| 751 | // Only GC controllers have analog triggers | ||
| 752 | if (npad_type != NpadStyleIndex::GameCube) { | ||
| 753 | return; | ||
| 754 | } | ||
| 755 | |||
| 741 | const auto& trigger = controller.trigger_values[index]; | 756 | const auto& trigger = controller.trigger_values[index]; |
| 742 | 757 | ||
| 743 | switch (index) { | 758 | switch (index) { |