Post Reply 
 
Thread Rating:
  • 2 Votes - 3 Average
  • 1
  • 2
  • 3
  • 4
  • 5
About right analog stick
06-11-2013, 12:23 PM
Post: #5
RE: About right analog stick
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*

ズキューーン
Find all posts by this user
Quote this message in a reply
Post Reply 


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

Forum Jump: