Skip to content

Commit 25c4b14

Browse files
SiegeLordExSiegeLord
authored andcommitted
Document ALLEGRO_NO_MAGIC_MAIN somewhere and document the argv[0] changing.
1 parent c8772fc commit 25c4b14

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

docs/src/refman/misc.txt

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,5 +19,9 @@ Linux this is no problem because you simply can call [al_install_system]. But
1919
some other system (like OSX) don't allow calling [al_install_system] in the main
2020
thread. al_run_main will know what to do in that case.
2121

22-
The passed argc and argv will simply be passed on to user_main and the return
23-
value of user_main will be returned.
22+
If you're calling this outside a library, define `ALLEGRO_NO_MAGIC_MAIN` before
23+
including `<allegro5/allegro.h>` to disable the automatic name mangling.
24+
25+
The passed argc and argv are passed on to user_main and the return value of
26+
user_main will be returned. In certain cases, Allegro may change argv[0] to
27+
point to a different directory (e.g. when inside a MacOS App bundle).

0 commit comments

Comments
 (0)