al_run_main(3alleg5)
β¨ NAME β¨
okay so al_run_main β it's giving Allegro 5 API energy, bestie. This page is literally called al_run_main(3alleg5), and we're about to make it make sense. π
πΈ SYNOPSIS πΈ
#include <allegro5/allegro.h>
int al_run_main(int argc, char **argv, int (*user_main)(int, char **))
π¦ DESCRIPTION π¦
So here's the tea: this function is your bestie when you don't have a main() function but you still wanna run Allegro. It's mostly useful inside a wrapper library, iykyk. π«Ά
On Windows and Linux, this is lowkey no problem at all β you can simply call al_install_system(3alleg5) and go about your day. Slay. β¨
But some other systems β like OSX β do not allow calling al_install_system(3alleg5) in the main thread. And that's exactly where al_run_main comes in: it will know what to do in that case. No cap. π
The argc and argv you pass in will simply be passed on to user_main, and the return value of user_main will be returned. That's it, that's the whole vibe. π
and that's the page, bestie π β this was from the Allegro reference manual, with the manual name al_run_main(3alleg5) up top. No date was listed in the footer, just the manual name and source. periodt. π
π¦ 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