Re: [AD] Unknown joystick axis problem under Windows

[ Thread Index | Date Index | More Archives ]

> Hello,

Sorry for the delay...

> I'm unsure if this mail is legitimally to be posted on the
> [AD] list, please tell me if isn't the case.
> My report may not lead to an actual bug, but I think Allegro
> may want to provide a workaround against what I'm pointing to
> below.

Reports on suspected bugs are welcome on [AD].

> Problem:
> The problem is that Allegro reports two sticks axis that
> are never in center position. I don't even know what those
> sticks are, and they do not correspond to anything I can
> manipulate with my joysticks.
> [very complete bugreport]
> Does someone familiar enough with Allegro DirectInput layer has an
> idea about this problem? Can anybody reproduce my modified exjoy.c
> inputs? Is the problem already known?

I think you stumbled upon a genuine bug in my code :-(  Could you try the 
attached patch?

P.S: Please don't use "--"s in the middle of your messages, they fool KMail 
and Mozilla Mail into thinking the message is a big signature, so it is 
butchered by the "Reply" button.

Eric Botcazou
--- /cvs/allegro/src/win/wjoydx.c	Fri Oct  4 15:19:38 2002
+++ allegro/src/win/wjoydx.c	Fri Jan  9 10:42:58 2004
@@ -263,7 +263,6 @@ static BOOL CALLBACK object_enum_callbac
       else {
          joy->hat_name = ustrdup(uconvert_ascii(lpddoi->tszName, tmp));
          joy->caps |= JOYCAPS_HASPOV;
-         joy->num_axes += 2;
    else if (memcmp(&lpddoi->guidType, &GUID_Button, sizeof(GUID)) == 0) {

Mail converted by MHonArc 2.6.19+