#78 Mac OSX allegro will not read config files

Tony Kramer

I have noticed that the Mac OSX version of the 4.2 beta
allegro won't read any data from a config file. At
first I thought that it was something that I was doing
wrong, but the example program exconfig has the same
problem. The set_config_file() doesn't crash or
anything. The get functions just return 0 or NULL.
Writing to the config files works just fine. I have
tested this using Mac OS 10.3.9 and 10.4.1 with xcode
1.2 (not xcode 2.0).


  • Tony Kramer
    Tony Kramer

    Logged In: YES

    I just found that it the example program exconfig will read
    the config file if it is run from the terminal in the same
    directory as the config file. But if you run it from any
    other directory (like ./examples/exconfig from the allegro
    root directory) or from finder, it will not load.

  • Peter Hull
    Peter Hull

    Logged In: YES

    I don't think this is a bug. From my interpretation of the
    documentation, Allegro will search various paths, including the
    executable directory, only for the allegro.cfg file. If you specify
    your own config file, as exconfig does, it will look in the place that
    you specified, so if you gave it a path-less filename, it will look in
    the current directory only.

    I think an argument could be made that this behaviour is rather
    useless, and it should search the executable directory, that is not
    what the docs say.

  • Logged In: YES
    Originator: NO

    set_config_file does not look in other locations for the file. Documentation updated to clarify this.