[AD] set_config_file jumping around on OS X bundles |
[ Thread Index |
Date Index
| More lists.liballeg.org/allegro-developers Archives
]
- To: alleg-developers@xxxxxxxxxx
- Subject: [AD] set_config_file jumping around on OS X bundles
- From: Matthew Leverton <meffer@xxxxxxxxxx>
- Date: Sun, 21 Aug 2005 00:31:46 -0500
- Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:mime-version:content-type:content-transfer-encoding:content-disposition; b=Qo2Jz3pjIyp6okShmZo8eDzMFRWKPlQKqHSJK3dokP6XKANCFpN5y+3Ji4dnFIRg0T4lx+Jucvw3R1sFl5dlQkln9EHulZV8EPSMdA5waqTIgRCexs01dT/peXyjZ9NrMx9FHEE+4dJ5s3nN4bgVTRix+4iW9LQ7dplitdH6rE4=
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