mirror of https://github.com/bjornbytes/lovr.git
Add basic help command line flag;
This commit is contained in:
parent
5e752f0b25
commit
bb9a20aaf2
11
src/main.c
11
src/main.c
|
@ -32,6 +32,17 @@ int main(int argc, char** argv) {
|
|||
exit(0);
|
||||
}
|
||||
|
||||
if (argc > 1 && (!strcmp(argv[1], "--help") || !strcmp(argv[1], "-h"))) {
|
||||
os_open_console();
|
||||
printf(
|
||||
"usage: lovr [options] [<folder>]\n"
|
||||
" -h, --help\t\tShow help and exit\n"
|
||||
" -v, --version\t\tShow version and exit\n"
|
||||
" --console\t\tAttach Windows console\n"
|
||||
);
|
||||
exit(0);
|
||||
}
|
||||
|
||||
if (!os_init()) {
|
||||
fprintf(stderr, "Failed to initialize platform");
|
||||
exit(1);
|
||||
|
|
Loading…
Reference in New Issue