[FIXED]Dinput Joystick/joypad support iffy.

Squall Leonhart
Posting Freak
Posts: 1223
Joined: Tue Mar 18, 2008 9:21 am

[FIXED]Dinput Joystick/joypad support iffy.

Post 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]

Last edited by Squall Leonhart on Tue Dec 27, 2011 12:32 pm, edited 1 time in total.
xKiv
Junior Member
Posts: 36
Joined: Fri Mar 21, 2008 9:47 am

[FIXED]Dinput Joystick/joypad support iffy.

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

Squall Leonhart
Posting Freak
Posts: 1223
Joined: Tue Mar 18, 2008 9:21 am

[FIXED]Dinput Joystick/joypad support iffy.

Post 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

spacy51
Senior Member
Posts: 371
Joined: Tue Mar 18, 2008 4:59 pm

[FIXED]Dinput Joystick/joypad support iffy.

Post 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" />

Last edited by spacy51 on Fri Jul 25, 2008 5:32 pm, edited 1 time in total.
Squall Leonhart
Posting Freak
Posts: 1223
Joined: Tue Mar 18, 2008 9:21 am

[FIXED]Dinput Joystick/joypad support iffy.

Post 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

Cobra951
Junior Member
Posts: 15
Joined: Thu Sep 11, 2008 10:30 pm

[FIXED]Dinput Joystick/joypad support iffy.

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

Squall Leonhart
Posting Freak
Posts: 1223
Joined: Tue Mar 18, 2008 9:21 am

[FIXED]Dinput Joystick/joypad support iffy.

Post by Squall Leonhart »

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

Squall Leonhart
Posting Freak
Posts: 1223
Joined: Tue Mar 18, 2008 9:21 am

[FIXED]Dinput Joystick/joypad support iffy.

Post by Squall Leonhart »

Update-

 

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

spacy51
Senior Member
Posts: 371
Joined: Tue Mar 18, 2008 4:59 pm

[FIXED]Dinput Joystick/joypad support iffy.

Post by spacy51 »

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

 

silly me

Squall Leonhart
Posting Freak
Posts: 1223
Joined: Tue Mar 18, 2008 9:21 am

[FIXED]Dinput Joystick/joypad support iffy.

Post by Squall Leonhart »

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

Locked