Re: [AD] Motion sensors as joysticks on Linux

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


On Sun, Apr 1, 2012 at 10:54 AM, Peter Wang <novalazy@xxxxxxxxxx> wrote:
>
> I *think* so.  You might want to control a game with an accelerometer
> (well, not really).

Depends, the accelerometers in my Phone are used for some games (it's
a 6-axis one though, orientation and acceleration for x/y/z). But yes,
if we detect a single-axis accelerometer we could safely ignore it :)

> We provide very little information about the device capabilities in the
> Allegro API, which would be nice to fix.  If your game requires buttons
> anyway then ignoring joysticks without buttons shouldn't hurt.
>

I also think the cleaner solution is to just ignore it in your game.
If it has a single axis and no buttons you sort of know what it is.

What information about device capabilities should/can Allegro provide?

I'm still dreaming of the unified input-device API I mentioned a few
times over the years, which you can use to get generalized input from
any device (including joysticks, mice and keyboards). With that it
would make sense to not have it show up as ALLEGRO_JOYSTICK but still
as ALLEGRO_INPUT_DEVICE.




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