Allegro.cc - Online Community

Allegro.cc Forums » Programming Questions » allegro5.cfg

Credits go to SiegeLord for helping out!
This thread is locked; no one can reply to it. rss feed Print
allegro5.cfg
LMBarros
Member #14,668
October 2012
avatar

Hello!

I have been happily using Allegro 5 for some weeks in a very small project here. Just now, when investigating why my program freezes under Linux when initializing audio, I learned that allegro5.cfg exists. My problem with audio initialization is solved, but I got some questions about the config file:

  1. Is there any documentation about it? Like what entries are valid in the allegro5.cfg file and the like. [Edit: Just found that a well-commented allegro5.cfg file is distributed with the Allegro 5 sources. I guess this answers my first question.]

  2. Can I pass configurations programmaticaly instead of using the config file?

  3. Can I somehow use a config file with a different name?

Thanks a lot!

LMB

SiegeLord
Member #7,827
October 2006
avatar

LMBarros said:

Can I pass configurations programmaticaly instead of using the config file?

Many things can be configured via the configuration file routines. E.g. this should work:

al_set_config_value(al_get_system_config(), "graphics", "driver", "opengl");
auto d = al_create_display(800, 600);

Quote:

Can I somehow use a config file with a different name?

No (unless you recompile Allegro with a different name for it).

"For in much wisdom is much grief: and he that increases knowledge increases sorrow."-Ecclesiastes 1:18
[SiegeLord's Abode][Codes]:[DAllegro5]:[RustAllegro]

LMBarros
Member #14,668
October 2012
avatar

Thanks!

BTW, I am using DAllegro5 in this project (even did a very minor contribution back in November) -- thanks for this too!

LMB

Go to: