RE: [AD] Small demo fix

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


> > Can GFX_SAFE fail? I thought it was supposed to work, or else
> exit with a
> > fatal error - so you didn't have to handle the error yourself.
>
> Ah, yes, I forgot about that (too used to GFX_SAFE not failing :). But
> wouldn't it be better for GFX_SAFE to return with failure? The user
> program might have some unsaved data or opened files which need correct
> treatement before closing.

I suppose we're getting on to the ethical issues of how GFX_SAFE should be
used. The docs say, "If it absolutely cannot set any graphics mode at all,
it will abort the program with an error message." In my opinion, if you're
writing a full-scale program with load and save, you should take a bit more
care with regard to the graphics mode.

In the case of the demo, I think having GFX_SAFE exit the program with an
error message is fine. Is that what GFX_SAFE still does, or has it been
changed since the docs were written?

Ben Davis



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