Re: [AD] Keyboard handling

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


On 8-Feb-09, at 2:26 AM, Colin Ward wrote:
Also, the examples/exkeys.c is horribly broken!  It uses the
keyboard_lowlevel_callback function callback, the documentation for which
explicitly says:

"This routine executes in an interrupt context"

Now I know that we don't use interrupts any more in "modern" ports, but it
can be expected that some ports use a different thread for keyboard
handling, which means that the same rules apply as for interrupts. Namely, do as little as possible and don't call Allegro functions for drawing to the screen! I spent quite a time tracking down the "bug" in my graphics
routines, to finally realise that it was exkeys.c, not me.

Yup. I ran into that one when I was working on my A5->A4 wrapper.
I think it's fine to leave it as is, but at the same time you don't need to feel bad about not supporting that situation.

Evert




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