Add option to bind right analog stick to left/right dpad buttons only. Can be useful for games that use the dpad as a camera, and horizontal camera movement is more common than vertical(i.e. Monster Hunter).

This commit is contained in:
The Dax committed 2013-07-05 06:02:47 -04:00
1 parent 1bf4239e97
commit fb3ade56b9
2 files changed
+8

No files matched your search

+4
View File
@@ -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;
}
}