mirror of
https://github.com/libretro/ppsspp.git
synced 2024-12-13 03:19:25 +00:00
Merge pull request #2627 from thedax/rightStickBindOption
Add option to bind right analog stick to left/right dpad buttons only.
This commit is contained in:
commit
39891eb9a6
@ -237,6 +237,10 @@ int DinputDevice::UpdateState(InputState &input_state)
|
||||
if (js.lZ > rthreshold) input_state.pad_buttons |= PAD_BUTTON_Y;
|
||||
else if (js.lZ < -rthreshold) input_state.pad_buttons |= PAD_BUTTON_A;
|
||||
break;
|
||||
case 5:
|
||||
if (js.lRz > rthreshold) input_state.pad_buttons |= PAD_BUTTON_RIGHT;
|
||||
else if (js.lRz < -rthreshold) input_state.pad_buttons |= PAD_BUTTON_LEFT;
|
||||
break;
|
||||
}
|
||||
|
||||
return UPDATESTATE_SKIP_PAD;
|
||||
|
@ -199,6 +199,10 @@ void XinputDevice::ApplyDiff(XINPUT_STATE &state, InputState &input_state) {
|
||||
if (state.Gamepad.sThumbRY > rthreshold) input_state.pad_buttons |= PAD_BUTTON_Y;
|
||||
else if (state.Gamepad.sThumbRY < -rthreshold) input_state.pad_buttons |= PAD_BUTTON_A;
|
||||
break;
|
||||
case 5:
|
||||
if (state.Gamepad.sThumbRX > rthreshold) input_state.pad_buttons |= PAD_BUTTON_RIGHT;
|
||||
else if (state.Gamepad.sThumbRX < -rthreshold) input_state.pad_buttons |= PAD_BUTTON_LEFT;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user