mirror of
https://git.suyu.dev/suyu/suyu.git
synced 2024-12-23 17:00:57 +01:00
Merge pull request #8863 from german77/triggers
core: hid: Fix GC triggers overwriting ZL and ZR buttons
This commit is contained in:
commit
16080b6e4e
1 changed files with 15 additions and 0 deletions
|
@ -562,6 +562,16 @@ void EmulatedController::SetButton(const Common::Input::CallbackStatus& callback
|
||||||
return;
|
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) {
|
switch (index) {
|
||||||
case Settings::NativeButton::A:
|
case Settings::NativeButton::A:
|
||||||
controller.npad_button_state.a.Assign(current_status.value);
|
controller.npad_button_state.a.Assign(current_status.value);
|
||||||
|
@ -738,6 +748,11 @@ void EmulatedController::SetTrigger(const Common::Input::CallbackStatus& callbac
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Only GC controllers have analog triggers
|
||||||
|
if (npad_type != NpadStyleIndex::GameCube) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
const auto& trigger = controller.trigger_values[index];
|
const auto& trigger = controller.trigger_values[index];
|
||||||
|
|
||||||
switch (index) {
|
switch (index) {
|
||||||
|
|
Loading…
Reference in a new issue