Add a right stick config for Valkyria Chronicles.

This commit is contained in:
Unknown W. Brackets 2013-06-21 17:59:12 -07:00
parent 8fe9620350
commit 47b0c5962a
2 changed files with 7 additions and 0 deletions

View File

@ -104,6 +104,7 @@ public:
// 1 = arrow buttons
// 2 = face buttons
// 3 = L/R
// 4 = L/R + triangle/cross
int iRightStickBind;
// Control

View File

@ -193,6 +193,12 @@ void XinputDevice::ApplyDiff(XINPUT_STATE &state, InputState &input_state) {
if (state.Gamepad.sThumbRX > rthreshold) input_state.pad_buttons |= PAD_BUTTON_RBUMPER;
else if (state.Gamepad.sThumbRX < -rthreshold) input_state.pad_buttons |= PAD_BUTTON_LBUMPER;
break;
case 4:
if (state.Gamepad.sThumbRX > rthreshold) input_state.pad_buttons |= PAD_BUTTON_RBUMPER;
else if (state.Gamepad.sThumbRX < -rthreshold) input_state.pad_buttons |= PAD_BUTTON_LBUMPER;
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;
}
}