Re: [AD] demo of new joystick API

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


On 2004-09-06, Peter Wang <tjaden@xxxxxxxxxx> wrote:
> 3. Button states were changed from bits (i.e. pressed or released)
> into integer values.  This is to support analogue buttons.
> Neither the Linux nor DirectX drivers support analogue buttons
> yet, though.

If you are designing something like this into the future, you might
want to use floats in range -1 to 1 instead of integers, to avoid
any possible issue with "DirectX gives -127 to 128 and Linux gives
-512 to 512" or similar.

> - Function: void al_uninstall_joystick_driver(void)

remove seems shorter to type, and the so far naming trend.

> 4. As a simple optimisation, I'm thinking of adding a "timestamp"
> or "watermark" field to the joystate structure.

What happened to "premature optimization is the root of all evil"?
Just forget that until the new version can be used in an actual game
and you can profile the time spent on copying/updating structures.




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