Re: [AD] keyboard buffer (proposal) |
[ Thread Index |
Date Index
| More lists.liballeg.org/allegro-developers Archives
]
- To: "Coordination of admins/developers of the game programming library Allegro" <alleg-developers@xxxxxxxxxx>
- Subject: Re: [AD] keyboard buffer (proposal)
- From: "Matthew Leverton" <meffer@xxxxxxxxxx>
- Date: Sat, 20 Dec 2008 17:53:14 -0600
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