Jump to content
Visual Boy Advance-M
Squall Leonhart

[FIXED]Dinput Joystick/joypad support iffy.

Recommended Posts

We seem to have broken joypad support somewhere along the lines....

 

with my own gamepad

 

Left stick

(X) Left-Right = Displays as X-

(Y) Up-Down = Displays as X+

 

Right Stick (R stands for Rotation)

RX = Displays as Joy Up and Joy Down, rather then RX+ and RX-

RY = + and - work properly.

 

 

 

Triggers (By default, they are usually on 1 Z axis but this makes pressing both at the same time impossible, i'll show the results of single axis first)

(Z-) L Trigger = Displays as Joy 1 left

(Z+) R Trigger = Displays as Joy 1 Right

 

I have them set on seperate axis

(Z-) L Trigger = Displays as Joy Left

(RZ-) R Trigger = Displays as Z Rotation - (Expected behavior)

Setting both triggers to the RZ axis results in the correct behavior

 

 

I'm not sure when this problem started occuring, however it works correctly in VBA 1.8

 

1.8's behavior is as following

 

Left Stick

X Axis = displays as joy left and right

Y Axis = displays as joy up and down

 

Right Stick

RX = X Rotation +-

RY = Y Rotation +-

 

Triggers

Z+- and RZ+- both work.

 

It seems only the axis functions are effected.

 

[attachment=41]

Share this post


Link to post
Share on other sites

And does 1.8 use DInput?

Different APIs might map the stick/pad events differently ... namely, one could just see all sticks and D-pads and others as axes without any differentiation, another sees a D-pad, maps one stick to a X-axis and Y-axis and the other to rudder and throttle (that's *my* gamepad).

And the final mapping to what you see is done randomly[1] by the API.

 

[1] FSVO randomly - each might do it differently, and differently for different models of pads, and different versions are different ...

Share this post


Link to post
Share on other sites

Yup, Win/MFC version uses DirectInput only. I'll have a look at it soon.

 

 

EDIT:

OK, I can confirm this as a genuine bug.

 

I just saw the DirectInput code was taken from one of my VBA-S versions, so it was probably me who broke something xD

Share this post


Link to post
Share on other sites

Ah. OK, I'm not crazy, and neither is my system. My Xbox 360 pad through the XBCD driver exhibits that behavior. I had to switch to a Nyko pad I have handy (which is fine, because the D-pad on the 360 controller is horrendous).

Share this post


Link to post
Share on other sites

I guess just changing the numbers from 5 to 8 and fixing all compile errors was not enough...

 

silly me

Share this post


Link to post
Share on other sites

Just tested SVN884 with my Logitech RumblePad 2. Funnily, when I move a stick, it either detects axis movement(X/Y axis +/-) OR a direction(left,right,up,down).

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.

×