Page 1 of 2

[FIXED]Dinput Joystick/joypad support iffy.

Posted: Wed Jul 23, 2008 7:12 pm
by Squall Leonhart

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]


[FIXED]Dinput Joystick/joypad support iffy.

Posted: Thu Jul 24, 2008 5:08 pm
by xKiv

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 ...


[FIXED]Dinput Joystick/joypad support iffy.

Posted: Fri Jul 25, 2008 1:26 am
by Squall Leonhart

as far as i know, the Win32 builds use Dinput.

 

Its the same pad in both VBA 1.8 and VBA-M 1.8


[FIXED]Dinput Joystick/joypad support iffy.

Posted: Fri Jul 25, 2008 5:10 am
by spacy51

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 [img]<fileStore.core_Emoticons>/emoticons/laugh.png[/img]/emoticons/laugh@2x.png 2x" width="20" height="20" />


[FIXED]Dinput Joystick/joypad support iffy.

Posted: Fri Jul 25, 2008 5:20 am
by Squall Leonhart

Thanks Spacy,

 

if you get a chance though

 

can you look over this

http://www.snes9x.com/phpbb2/viewtopic.php?p=24619#24619

 

lol


[FIXED]Dinput Joystick/joypad support iffy.

Posted: Fri Sep 19, 2008 1:21 pm
by Cobra951

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).


[FIXED]Dinput Joystick/joypad support iffy.

Posted: Tue Sep 30, 2008 5:32 am
by Squall Leonhart

yeah, don't worry about what the values say, it still works properly.


[FIXED]Dinput Joystick/joypad support iffy.

Posted: Mon Aug 10, 2009 1:40 am
by Squall Leonhart

Update-

 

The problem has occured since Spacy changed the Dinput format from DI5 to DI8.


[FIXED]Dinput Joystick/joypad support iffy.

Posted: Fri Aug 14, 2009 3:15 pm
by spacy51

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

 

silly me


[FIXED]Dinput Joystick/joypad support iffy.

Posted: Fri Aug 14, 2009 4:45 pm
by Squall Leonhart

its ok, lol, yeah the numbers wasn't enough, and its not as simple as just reverting to DI5 either.