PAD: simulate L/R trigger button events if player holds analog L/R down >= 95% of the way

This commit is contained in:
Phillip Stephens 2022-03-24 01:43:18 -07:00
parent 51a1b6ba9b
commit 67818aaabc
Signed by: Antidote
GPG Key ID: F8BEE4C83DACA60D
1 changed files with 8 additions and 0 deletions

View File

@ -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;