From 47b0c5962a1e81dae85b5c6ab2bd6aecec55cece Mon Sep 17 00:00:00 2001 From: "Unknown W. Brackets" Date: Fri, 21 Jun 2013 17:59:12 -0700 Subject: [PATCH] Add a right stick config for Valkyria Chronicles. --- Core/Config.h | 1 + Windows/XinputDevice.cpp | 6 ++++++ 2 files changed, 7 insertions(+) diff --git a/Core/Config.h b/Core/Config.h index 1ff70602bd..06f1df64b3 100644 --- a/Core/Config.h +++ b/Core/Config.h @@ -104,6 +104,7 @@ public: // 1 = arrow buttons // 2 = face buttons // 3 = L/R + // 4 = L/R + triangle/cross int iRightStickBind; // Control diff --git a/Windows/XinputDevice.cpp b/Windows/XinputDevice.cpp index 90cfc0505b..c1a25a3c6d 100644 --- a/Windows/XinputDevice.cpp +++ b/Windows/XinputDevice.cpp @@ -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; } }