RE: [AD] destroy_bitmap after allegro_exit and get_config_string before allegro_init

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


Title: RE: [AD] destroy_bitmap after allegro_exit and get_config_string before allegro_init

> It would be better if the user had to *explicitly* disable
> the atexit()
> registration, rather than doing it by accident, since a lot of things
> are cleaned up in the call to allegro_exit(), so if it is not
> made, the
> system won't be left in a nice state.

I think the chance of an accident is fairly low, as install_allegro
is rather new and allegro_init calls it with &atexit already IIRC.
Therefore, you must specifically call install_allegro with NULL for
getting this behavior.

On a parallel topic, I just remembered one thing: set_uformat must
be called before allegro_init. allegro_init must be called before
get_config_string. get_config_string must be called before set_uformat
if one wants to have an option in the config file to set the text
format to be used. The only option is to initialize allegro, read
the text format to use, exit allegro, call set_uformat, then initialize
allegro again. Not very clean. Unfortunately, I see no easy way out
of this. If anyone does, comments are most welcome.

--
Vincent Penquerc'h



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