[AD] set_config_file jumping around on OS X bundles

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


On OS X, it autodetects whether or not your application sits in an app
bundle. If it does, then it (by default) looks inside the app bundle
for data & config files.

I just noticed tonight that if you do this:

set_config_file('game.ini')
allegro_init();

it doesn't detect that you are in an app bundle when loading the ini file.

The worst part is that when the application exits, then the files get
saved *inside* the app bundle. So basically, it reads from an ini file
that sits outside the app bundle, but writes to one inside.

Ideally, setting the config file name before allegro_init() should
still be able to detect whether or not you are in an app bundle. If
that cannot be done for some reason, then I don't think that by
default Allegro should write the file to a different location than it
read it from.

For my purposes, I just moved the set_config_file() option after the
allegro_init() to work around it.

--
Matthew Leverton




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