Thread Rating:
  • 2 Vote(s) - 3 Average
  • 1
  • 2
  • 3
  • 4
  • 5
About right analog stick
#1
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
Reply
#2
Let me see if KrossX can add this in quickly and easily.
Reply
#3
I dunno if quickly and easily.

I suppose kross keys means dpad? Or just support in general to map sticks to buttons?
Reply
#4
Oh,I mean Dpad,sorry.
Reply
#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
#6
Thank you very much!!
Reply
#7
I merged this temporarily until we improve proper mapping functionality.
Reply
#8
(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
Reply
#9
@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.
ズキューーン
Reply
#10
(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
Reply
#11
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.
ズキューーン
Reply
#12
@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.
Reply
#13
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.
Reply
#14
But the direction of DirectInput was still wrong!
Reply
#15
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
Reply


Forum Jump: