mirror of https://github.com/AxioDL/metaforce.git
PAD: simulate L/R trigger button events if player holds analog L/R down >= 95% of the way
This commit is contained in:
parent
51a1b6ba9b
commit
67818aaabc
|
@ -414,6 +414,14 @@ u32 PADRead(PAD::Status* status) {
|
||||||
|
|
||||||
x = SDL_GameControllerGetAxis(controller.m_controller, SDL_CONTROLLER_AXIS_TRIGGERLEFT);
|
x = SDL_GameControllerGetAxis(controller.m_controller, SDL_CONTROLLER_AXIS_TRIGGERLEFT);
|
||||||
y = SDL_GameControllerGetAxis(controller.m_controller, SDL_CONTROLLER_AXIS_TRIGGERRIGHT);
|
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;
|
x /= 128;
|
||||||
y /= 128;
|
y /= 128;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue