1al_run_main(3) Library Functions Manual al_run_main(3)
2
3
4
6 al_run_main
7
9 #include <allegro5/allegro.h>
10
11 int al_run_main(int argc, char **argv, int (*user_main)(int, char **))
12
14 This function is useful in cases where you don't have a main() function
15 but want to run Allegro (mostly useful in a wrapper library). Under
16 Windows and Linux this is no problem because you simply can call
17 al_install_system(3). But some other system (like OSX) don't allow
18 calling al_install_system(3) in the main thread. al_run_main will know
19 what to do in that case.
20
21 The passed argc and argv will simply be passed on to user_main and the
22 return value of user_main will be returned.
23
24
25
26Allegro reference manual al_run_main(3)