Thread Rating:
  • 2 Vote(s) - 3 Average
  • 1
  • 2
  • 3
  • 4
  • 5
About right analog stick
#5
Quicky hackup: (build + patch). It's a VS2012 build, so you'll need runtimes... and it ain't for XP either. >_<

Code:
diff --git a/Windows/XinputDevice.cpp b/Windows/XinputDevice.cpp index a00f17d..6657432 100644 --- a/Windows/XinputDevice.cpp +++ b/Windows/XinputDevice.cpp @@ -171,6 +171,13 @@ void XinputDevice::ApplyDiff(XINPUT_STATE &state, InputState &input_state) { input_state.pad_buttons |= xinput_ctrl_map[i + 1]; } + const SHORT rthreshold = 22000; + + 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; + + if (state.Gamepad.sThumbRY > rthreshold) input_state.pad_buttons |= PAD_BUTTON_UP; + else if(state.Gamepad.sThumbRY < -rthreshold) input_state.pad_buttons |= PAD_BUTTON_DOWN; } } int XinputDevice::UpdateRawStateSingle(RawInputState &rawState)

Most of the time was spent on getting it to compile and... getting the patch file. *sighs*
ズキューーン
Reply


Messages In This Thread
About right analog stick - by mk22customg - 06-11-2013, 09:09 AM
RE: About right analog stick - by Squall Leonhart - 06-11-2013, 09:17 AM
RE: About right analog stick - by KrossX - 06-11-2013, 10:07 AM
RE: About right analog stick - by mk22customg - 06-11-2013, 10:44 AM
RE: About right analog stick - by KrossX - 06-11-2013, 12:23 PM
RE: About right analog stick - by mk22customg - 06-11-2013, 12:51 PM
RE: About right analog stick - by Henrik - 06-11-2013, 05:40 PM
RE: About right analog stick - by vnctdj - 06-11-2013, 06:06 PM
RE: About right analog stick - by KrossX - 06-11-2013, 10:38 PM
RE: About right analog stick - by vnctdj - 06-12-2013, 07:12 PM
RE: About right analog stick - by KrossX - 06-13-2013, 03:32 AM
RE: About right analog stick - by mk22customg - 06-22-2013, 08:58 AM
RE: About right analog stick - by RPG Advocate - 06-22-2013, 11:23 AM
RE: About right analog stick - by mk22customg - 06-24-2013, 02:04 PM
RE: About right analog stick - by Xendran - 06-28-2013, 09:40 AM
RE: About right analog stick - by Tamagotchi - 06-28-2013, 01:51 PM
RE: About right analog stick - by Tamagotchi - 06-29-2013, 03:22 AM
RE: About right analog stick - by sceck - 07-02-2013, 09:08 PM
RE: About right analog stick - by vnctdj - 07-03-2013, 07:57 AM
RE: About right analog stick - by Tamagotchi - 07-02-2013, 09:13 PM
RE: About right analog stick - by Tamagotchi - 07-03-2013, 02:02 PM
RE: About right analog stick - by Henrik - 07-03-2013, 03:13 PM
RE: About right analog stick - by auriculogenesis - 07-03-2013, 05:52 PM
RE: About right analog stick - by vnctdj - 07-03-2013, 06:53 PM
RE: About right analog stick - by Special - 07-03-2013, 05:59 PM

Forum Jump: