Joystick-axis in windows

Platform: Win32, w2k
SDL: Latest cvs version.

I’ve encountered a little bit of a problem while messing around with my
wingman rumblepad in the windows version of SDL. The joypad have five
separate analog axis, but only four of them are reported correctly by
SDL. The fifth always returns full negative input. Marcos Balsa seemed
to have a similar problem, see mail at the end of this one. I’ve
tracked the problem down to the MM-function joyGetPosEx. Even though
the CAPS-field reports that the joystick have 5 axes, the fifth value
(as well as the 6:th) are set to 0, which indicates that the axis
wasn’t present. While running though the DX9 sample for joysticks I
noticed that the axes were reported as #1,2,3,4 and 8. It doesn’t seems
like MM supports more than 6 axes and worse, doesn’t resort the axes so
that they fill the lower indices.

Could this be fixed in the existing version of the code? Or is this a
limitation in the MM-api? If so, we really need a DX version of this
code that addresses these problems.

The previous mail I found below didn’t have any more responses as far
as I could find (really, searched the archives through google in
absence of a search facility in the mail archives, it’s really silly to
download a 100mb file just to search through … )

I was having trouble reading one of the axes on my Microsoft
Sidewinder

force feedback wheel using SDL’s Windows MM joystick driver. The
problem is

that it returns data on axes 1, 2, and 5. The SDL joystick driver
detects

that axis 3 doesn’t exist and so assumes that there are only 2 axes.
I was

feeling adventurous so I went ahead and wrote a new joystick
subsystem for

SDL that uses Directx 8 instead. I’m also planning to kludge in some
sort

of force-feedback support. I don’t know how helpful this will be,
but it

might fix your problems on Windows. If anyone wants it (warning in
advance:

it’s pretty ugly) let me know and I’ll upload the source and post a
link to

the list.
It’d be more useful if you could fix the existing code, since that
might
be able to be incorporated into the current release. I doubt Sam
will want to introduce DX8 dependencies into the current release (hope
not :), but he might accept a patch to fix this axis problem with the
current
code.

Yes, indeed, if you could post a patch, I would appreciate it.

Thanks!
-Sam Lantinga, Software Engineer, Blizzard Entertainment

-------------- next part --------------
A non-text attachment was scrubbed…
Name: not available
Type: text/enriched
Size: 2849 bytes
Desc: not available
URL: http://lists.libsdl.org/pipermail/sdl-libsdl.org/attachments/20031113/04b53102/attachment.bin>On Mon, Feb 03, 2003 at 10:23:39PM +0000, Ryan Silk wrote: