VERY experimental Nintendo Switch 2 emulator
C++
core: hid: Fix GC triggers overwritting ZL and ZR buttons
Narr the Reg07d2e0827219
diff --git a/src/core/hid/emulated_controller.cpp b/src/core/hid/emulated_controller.cppindex f9f902c2dd..01c43be934 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& callbackreturn;}+ // 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& callbacreturn;}+ // Only GC controllers have analog triggers+ if (npad_type != NpadStyleIndex::GameCube) {+ return;+ }+const auto& trigger = controller.trigger_values[index];switch (index) {