[FIXED]Dinput Joystick/joypad support iffy.

Squall Leonhart
Posting Freak
Posts: 1219
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: 1219
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/[email protected] 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: 1219
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: 1219
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: 1219
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: 1219
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