mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2025-04-20 11:35:45 +00:00
possible R2/L2 fix
This commit is contained in:
parent
83bcced16c
commit
3e8d7c2040
1 changed files with 7 additions and 1 deletions
|
@ -306,7 +306,13 @@ void WindowSDL::onGamepadEvent(const SDL_Event* event) {
|
|||
: event->gaxis.axis == SDL_GAMEPAD_AXIS_RIGHT_TRIGGER ? Input::Axis::TriggerRight
|
||||
: Input::Axis::AxisMax;
|
||||
if (axis != Input::Axis::AxisMax) {
|
||||
controller->Axis(0, axis, Input::GetAxis(-0x8000, 0x8000, event->gaxis.value));
|
||||
if (event->gaxis.axis == SDL_GAMEPAD_AXIS_LEFT_TRIGGER ||
|
||||
event->gaxis.axis == SDL_GAMEPAD_AXIS_RIGHT_TRIGGER) {
|
||||
controller->Axis(0, axis, Input::GetAxis(0, 0x8000, event->gaxis.value));
|
||||
|
||||
} else {
|
||||
controller->Axis(0, axis, Input::GetAxis(-0x8000, 0x8000, event->gaxis.value));
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue