mirror of
https://gitlab.com/dosowisko.net/libsuperderpy.git
synced 2025-02-01 02:56:43 +01:00
Reset getopt state when parsing arguments
This lets the application parse some arguments itself.
This commit is contained in:
parent
4fd703f821
commit
9a2f26c609
1 changed files with 2 additions and 0 deletions
|
@ -141,6 +141,7 @@ SYMBOL_EXPORT struct Game* libsuperderpy_init(int argc, char** argv, const char*
|
|||
{NULL, 0, NULL, 0},
|
||||
};
|
||||
|
||||
optind = 1;
|
||||
int opt;
|
||||
while ((opt = getopt_long(argc, argv, "dfw", long_options, NULL)) != -1) {
|
||||
switch (opt) {
|
||||
|
@ -159,6 +160,7 @@ SYMBOL_EXPORT struct Game* libsuperderpy_init(int argc, char** argv, const char*
|
|||
break;
|
||||
}
|
||||
}
|
||||
optind = 1;
|
||||
|
||||
game->show_console = game->config.debug.enabled;
|
||||
game->_priv.show_timeline = false;
|
||||
|
|
Loading…
Reference in a new issue