From 67818aaabc722a28657c71d7d4a0ffdbae92e0bc Mon Sep 17 00:00:00 2001 From: Phillip Stephens Date: Thu, 24 Mar 2022 01:43:18 -0700 Subject: [PATCH] PAD: simulate L/R trigger button events if player holds analog L/R down >= 95% of the way --- aurora/lib/input.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/aurora/lib/input.cpp b/aurora/lib/input.cpp index cee410780..315405275 100644 --- a/aurora/lib/input.cpp +++ b/aurora/lib/input.cpp @@ -414,6 +414,14 @@ u32 PADRead(PAD::Status* status) { x = SDL_GameControllerGetAxis(controller.m_controller, SDL_CONTROLLER_AXIS_TRIGGERLEFT); y = SDL_GameControllerGetAxis(controller.m_controller, SDL_CONTROLLER_AXIS_TRIGGERRIGHT); + if (!controller.m_isGameCube) { + if (x > 31150) { + status[i].x0_buttons |= PAD::TRIGGER_L; + } + if (y > 31150) { + status[i].x0_buttons |= PAD::TRIGGER_R; + } + } x /= 128; y /= 128;