Re: [AD] Exorcising END_OF_MAIN for Allegro 5

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


On 7/14/08, Peter Wang <novalazy@xxxxxxxxxx> wrote:
> The problem used to be that one of the Mac libraries needed to take over
> the main thread, so we had to relegate the user's code to another
> thread.  I hope it has changed.
Right, the OS will only deliver events to the main thread but in
Allegro 4 there was nowhere in the user's code where we could reliably
receive and dispatch the events. Magic main is used to run the user's
main() in a second thread. A5 uses the same design at the moment. We
could get around this if we require the user to call al_wait_for_event
regularly (which I think is not the current case) or figure out some
way to return from al_init but in a different thread (longjmp,
ucontext or similar)

Pete




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