Re: [AD] keyboard buffer (proposal)

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


On Sat, Dec 20, 2008 at 5:00 PM, Peter Wang <novalazy@xxxxxxxxxx> wrote:
> I don't see that your example all that different from:
>
It's not. The thread issue is reason enough to keep the key state.

> I'm okay with adding the key buffer.
>
>> +   do {
>> +      al_wait_for_event(keyboard_queue, &event);
>> +   } while (event.type == ALLEGRO_EVENT_KEY_UP);
>
> You should accept ALLEGRO_EVENT_KEY_REPEAT as well.
>
Actually it accepts KEY_DOWN and KEY_REPEAT. (It's filtering out the
UPs). I was going to do UP & REPEAT, but the unichar is missing from
the UP.

--
Matthew Leverton




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