Re: [AD] Exorcising END_OF_MAIN for Allegro 5 |
[ 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] Exorcising END_OF_MAIN for Allegro 5
- From: "Peter Hull" <peterhull90@xxxxxxxxxx>
- Date: Mon, 14 Jul 2008 08:24:40 +0100
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