[AD] Problem with joystick on Windows XP |
[ Thread Index |
Date Index
| More lists.liballeg.org/allegro-developers Archives
]
Hello, allegro is pretty cool, thanks for your really good...
There is a bug I have found, serious to me as I explain be...
concerning the joystick support. Below is the original mes...
planning to send which contains the details. Note that, al...
-- PROBLEM --
There is a problem with joystick support under Windows XP. (I don't know
if it is under XP specifically)
I run exjoy.exe and it does not get any data from the joystick (thinks
it is frozen at -128,-128)
However it DOES identify the joystick (if I don't plug the joystick in,
it complains), and it DOES identify the joystick's TYPE (number of axis,
buttons,...)
More Specifically:
I have an Intel Celeron 2,6GHz, I run Windows XP.
I have compiled allegro binaries and examples with MinGW gnu compiler (I
also tested the precompiled MSVC .dlls for the library)
I use the DEBUG libraries
Now my joystick:
It's a USB, ANALOG stick, 4-buttons, a POV (this funny thing like a
cursor), and a SLIDER. (an old 2000s quickshot thing).
(note: Allegro DOES identify 2 STICKS -i suppose the second is the
slider-, but does not get any data for the 2nd stick either - I tested)
My Configuration for the Joystick on Windows Control Panel is: "4 axis 4
button joystick with hat switch"
Also, a tricky part: the FIRST joystick that is registered in the
control panel, is a different type joystick which is Inactive. Instead,
the SECOND "slot" described as "4 axis 4 button joystick with hat
switch", is Active, when I plug in the joystick I talked about.
Also button presses are NOT caught (as they're part of the data)
-- END OF PROBLEM ---
For me this is a big deal - you understand: you can't create a game that
won't have joystick support under several circumstances, especially if
the joystick is important to the specific game...
-- WHERE I COULD HELP --
If you can't reproduce the specific problem, I could help. If you would
like me to try different compilations, please send me a compiled win32
.exe for exjoy.exe to tell you if the problem is in it too.
Also, as I was working on this thing, I managed to make my joystick
work, using the winmm windows library.
I don't know what implementation you are using, however, I could
contribute by coding this thing into allegro, if you like. I suppose
though that you are using something like DirectInput for the Windows
support.
However,
-- POSSIBLE SOLUTION, BOLD!! --
Something that might be valuable to you is the thing I saw while using
winmm for the Joystick support:
joyGetNumDevs() which is supposed to return the number of joysticks
returned 16. (instead of 1), BUT, the joystick ID that worked for me was
NOT 0, but 1.
Trying to test Joystick 0, with Windows API, returned Error
Trying to use Joystick 1, returned all the data.
So if there is something similar, in your implementation, you could try
enumarating and testing ALL the possible joystick ID's instead of the
FIRST ones,
I hope I could help.
If you who know better your routines have no time to look at this, you
could ask me to help
Thanks...
Kimon Kontosis(std01145@xxxxxxxxxx)