summaryrefslogtreecommitdiffstats
path: root/src/core
diff options
context:
space:
mode:
authorNarr the Reg <juangerman-13@hotmail.com>2022-09-05 23:08:30 +0200
committerNarr the Reg <juangerman-13@hotmail.com>2022-09-05 23:09:21 +0200
commitdc8d42243b1eb4ea2b1192273e58586a617419be (patch)
treee4f4323bb4f80ad85b96b5f64846798ecce32610 /src/core
parentMerge pull request #8843 from Kelebek1/SILENCE_WENCH (diff)
downloadyuzu-dc8d42243b1eb4ea2b1192273e58586a617419be.tar
yuzu-dc8d42243b1eb4ea2b1192273e58586a617419be.tar.gz
yuzu-dc8d42243b1eb4ea2b1192273e58586a617419be.tar.bz2
yuzu-dc8d42243b1eb4ea2b1192273e58586a617419be.tar.lz
yuzu-dc8d42243b1eb4ea2b1192273e58586a617419be.tar.xz
yuzu-dc8d42243b1eb4ea2b1192273e58586a617419be.tar.zst
yuzu-dc8d42243b1eb4ea2b1192273e58586a617419be.zip
Diffstat (limited to 'src/core')
-rw-r--r--src/core/hid/emulated_controller.cpp15
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
return;
}
+ // GC controllers have triggers not buttons
+ if (npad_type == NpadStyleIndex::GameCube) {
+ if (index == Settings::NativeButton::ZR) {
+ return;
+ }
+ if (index == Settings::NativeButton::ZL) {
+ return;
+ }
+ }
+
switch (index) {
case Settings::NativeButton::A:
controller.npad_button_state.a.Assign(current_status.value);
@@ -738,6 +748,11 @@ void EmulatedController::SetTrigger(const Common::Input::CallbackStatus& callbac
return;
}
+ // Only GC controllers have analog triggers
+ if (npad_type != NpadStyleIndex::GameCube) {
+ return;
+ }
+
const auto& trigger = controller.trigger_values[index];
switch (index) {