Post Reply 
 
Thread Rating:
  • 2 Votes - 3 Average
  • 1
  • 2
  • 3
  • 4
  • 5
About right analog stick
06-11-2013, 09:09 AM
Post: #1
About right analog stick
Hello, I am a chinese fan of ppsspp. I found a problem in the PC version when playing MHP2G with X360GAMEPAD ,That is to use the cross keys in X360GAMEPAD to control perspective is very difficult, but RAnalogStick is not used. Whether you can add a function make the RAnalogStick to simulate the cross keys like PSV? I believe that many games need this.
THANKS!Big Grin
Find all posts by this user
Quote this message in a reply
06-11-2013, 09:17 AM
Post: #2
RE: About right analog stick
Let me see if KrossX can add this in quickly and easily.
Find all posts by this user
Quote this message in a reply
06-11-2013, 10:07 AM
Post: #3
RE: About right analog stick
I dunno if quickly and easily.

I suppose kross keys means dpad? Or just support in general to map sticks to buttons?
Find all posts by this user
Quote this message in a reply
06-11-2013, 10:44 AM
Post: #4
RE: About right analog stick
Oh,I mean Dpad,sorry.
Find all posts by this user
Quote this message in a reply
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
06-11-2013, 12:51 PM
Post: #6
RE: About right analog stick
Thank you very much!!
Find all posts by this user
Quote this message in a reply
06-11-2013, 05:40 PM
Post: #7
RE: About right analog stick
I merged this temporarily until we improve proper mapping functionality.
Find all posts by this user
Quote this message in a reply
06-11-2013, 06:06 PM
Post: #8
RE: About right analog stick
(06-11-2013 05:40 PM)Henrik Wrote:  I merged this temporarily until we improve proper mapping functionality.

That's a very good thing Smile

♦ Intel Core i7-6700HQ | 16 GB RAM | NVIDIA GeForce GTX 960M | Debian Testing
♦ Intel Core i7-2630QM | 4 GB RAM | NVIDIA GeForce GT 540M | Debian Testing
♦ PSP-3004 | 6.60 PRO-C2
Find all posts by this user
Quote this message in a reply
06-11-2013, 10:38 PM (This post was last modified: 06-11-2013 10:39 PM by KrossX.)
Post: #9
RE: About right analog stick
@Henrik: What do you have in mind for proper right stick mapping?

Maybe just add support for using axes as digital input? Linear with maybe a lower threshold for bigger diagonals. Or maybe there's no need for diagonals and 4-way is preferred... *sighs*

As per the commit comments, with mappable axes and per-game controls those weird cases can be covered instead of having multiple preset choices. On Windows that is.

ズキューーン
Find all posts by this user
Quote this message in a reply
06-12-2013, 07:12 PM
Post: #10
RE: About right analog stick
(06-11-2013 10:38 PM)KrossX Wrote:  @Henrik: What do you have in mind for proper right stick mapping?

Maybe just add support for using axes as digital input? Linear with maybe a lower threshold for bigger diagonals. Or maybe there's no need for diagonals and 4-way is preferred... *sighs*

As per the commit comments, with mappable axes and per-game controls those weird cases can be covered instead of having multiple preset choices. On Windows that is.

I think that Henrik is thinking about a real interface to map all the buttons and sticks to every key you want, like you can see in some PC games (for example GTA San Andreas)...

Per-game settings is another good option too Smile

♦ Intel Core i7-6700HQ | 16 GB RAM | NVIDIA GeForce GTX 960M | Debian Testing
♦ Intel Core i7-2630QM | 4 GB RAM | NVIDIA GeForce GT 540M | Debian Testing
♦ PSP-3004 | 6.60 PRO-C2
Find all posts by this user
Quote this message in a reply
06-13-2013, 03:32 AM
Post: #11
RE: About right analog stick
I could do quicky support to free mapping with the rest intact (ie, keyboard, xinput, dinput still separated) but something like Dolphin's input customization is way beyond ma'skills.

ズキューーン
Find all posts by this user
Quote this message in a reply
06-22-2013, 08:58 AM
Post: #12
RE: About right analog stick
@Henrik: The right stick direction of DirectInput(v0.7.6-1530) is wrong!
Up is left, down is right, left is down, right is up.
Find all posts by this user
Quote this message in a reply
06-22-2013, 11:23 AM
Post: #13
RE: About right analog stick
I would actually like to see four INI settings for the right analog:

0 = off
1 = ↑↓←→
2 = △✕□◯
3 = L/R

That would cover 99% of what you would want to do with the right stick.
Find all posts by this user
Quote this message in a reply
06-24-2013, 02:04 PM
Post: #14
RE: About right analog stick
But the direction of DirectInput was still wrong!
Find all posts by this user
Quote this message in a reply
06-28-2013, 09:40 AM (This post was last modified: 06-28-2013 09:40 AM by Xendran.)
Post: #15
RE: About right analog stick
I wonder if it's possible to do some hacky right stick implementation that allows it to function like it would on a PS, with full directonal camera control
Find all posts by this user
Quote this message in a reply
Post Reply 


Forum Jump: