al_get_system_config(3alleg5)
β¨ al_get_system_config β¨
okay bestie, welcome to the Allegro 5 API corner of the manual π this one's short but it's giving main character config energy, so let's get into it π
πΈ NAME πΈ
al_get_system_config β Allegro 5 API (yes that's the whole name, she's simple, she's iconic)
π¦ SYNOPSIS π¦
#include <allegro5/allegro.h>
ALLEGRO_CONFIG *al_get_system_config(void)
π DESCRIPTION π
So basically, this function returns the system configuration structure. That's it, that's the whole vibe β¨
π¨ BIG ONE, bestie: the configuration you get back should NOT be destroyed with al_destroy_config(3alleg5). Not yours to destroy, hands off, no cap π
What's it even for? Mainly for configuring Allegro and its addons. And here's the cute part β you can populate this config before Allegro is installed to control stuff like the logging levels and other features π
π§ How Allegro fills this thing in π§
Allegro will try to populate this configuration by loading a config file from a few different locations, in this exact order:
- Unix only:
/etc/allegro5rc - Unix only:
$HOME/allegro5rc - Unix only:
$HOME/.allegro5rc allegro5.cfgnext to the executable
If it finds multiple copies, they get merged using al_merge_config_into(3alleg5) π β like a little config group hug, obsessed.
π Where the contents are documented π
The contents of this file are documented inside a prototypical allegro5.cfg that you can find in the root directory of the source distributions of Allegro. They are also reproduced below, iykyk π
__ALLEGRO_5_CFG
β οΈ Note, and this is important: Allegro will not look into that file unless you make a copy of it and place it next to your executable! So don't just sit there wondering why nothing's happening, bestie π
π cute sign-off π
and that's the tea π«Ά this page lives in the Allegro reference manual, filed under al_get_system_config(3alleg5). go forth and configure slayfully β¨π
πΈ
π¦ where this page comes from
- debian trixie: allegro5-doc 2:5.2.10.1+dfsg-1 Β· Zlib
- ubuntu questing: allegro5-doc 2:5.2.10.1+dfsg-1build1
- ubuntu resolute: allegro5-doc 2:5.2.11.3+dfsg-1 Β· Zlib
- ubuntu stonking: allegro5-doc 2:5.2.11.3+dfsg-1 Β· Zlib
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms