Re: [AD] mouse state variables and poll_mouse

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


Evert Glebbeek wrote:

I've never needed it, but It seems odd to me that
after you change to polling mode you cannot go back to
assyncronous mode. Perhaps someday, someone might need
to revert to assyncronous mode after using polling
mode (eg., if the programmer wishes to offer to the
user of his game the possibility of setting back and
forth between assyncronous and polling mode).

I suppose one could argue that if it can be enabled, there would have to be
a way to disable it as well.
I don't have a strong opinion either way. If you think it's useful and
no-one objects, I'm ok with including this if you make a patch for it. Make
sure you also make one for the keyboard in that case.
Best to wait a bit to see if noone does object though.

Yes, I object. If you don't need it, don't add it. In fact, just don't call poll_mouse() or poll_keyboard().

By the way, why does Allegro offers an assyncronous
mouse state update? Isn't the polling mode alone
enough?

Yes. The reason there's an asynchronous mode (which is the default) is, I
think, historical. The polling-mode was added with the idea that some
future platforms might need it.

IMHO polling mode is artificial. None of the current ports use it, and probably none ever will (we have threads now).

Peter




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