Re: [AD] END_OF_MAIN removal patch for msvc |
[ 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] END_OF_MAIN removal patch for msvc
- From: "Stefanos A." <stapostol@xxxxxxxxxx>
- Date: Wed, 19 Nov 2008 10:43:35 +0200
On Wed, 2008-11-19 at 19:11 +1100, Peter Wang wrote:
> On 2008-11-19, Thomas Fjellstrom <tfjellstrom@xxxxxxxxxx> wrote:
> > On November 18, 2008, Peter Wang wrote:
> > >
> > > No. I may want to use Allegro in an environment where my code is not
> > > allowed to block in al_run(). I know it might not work on certain
> > > platforms, but that's my choice to make.
> >
> > All I really care about is making the api consistent. Meaning the actual code
> > the user has to write is identical on all supported platforms. None of this "I
> > don't have to do it here, so I won't, even if it isn't compatible with other
> > supported platforms".
>
> So you want to artificially prevent me from using Allegro in some
> situations because it might not be portable to some brain dead platform
> that I don't care about? Right.
>
Concrete example of such a situation where "my code is not allowed to
block in al_run()"? Any reason why you can't just fork before calling
al_init & al_run? I'm not saying al_run is the best or even a good
design, although I do believe it's better than the END_OF_MAIN macro.
What about the alternative, i.e. calling al_process_events periodically?
It has minimal impact to the API, it does not tie you to a paradigm you
may not care about, it does not block. Any downsides?
int main(void)
{
al_init();
[...]
while (1)
{
al_process_events();
[...]
}
}