Re: [AD] Finding if joystick is analog or digital

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


On Wed, 13 Jun 2012 23:49:12 -0600, Trent Gamblin <trent@xxxxxxxxxx> wrote:
> I wanted to find a way to tell if a gamepad stick is analog or digital on Mac, so I read the USB HID tables. Is says there that there is actually no way to tell by the USB specification. I was wondering how other platforms are able to tell? Or is this field useless?

It's useless.  The Windows joystick driver sets the POV hat to digital,
and everything else to digital+analogue.  The Linux joystick driver sets
everything as analogue.  If we used changed it to use the Linux generic
input API, instead of the older joystick API, we might be able to get
some information out of it, but I'm not sure.

Peter




Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/