allow -n in nogfx mode
This commit is contained in:
parent
72e8c0d907
commit
17dcbd295e
1 changed files with 4 additions and 3 deletions
|
@ -133,9 +133,10 @@ int main(int argc, char **argv)
|
|||
return 1;
|
||||
}
|
||||
|
||||
b8 is_interactive = !args.print_to_terminal && !args.only_print_rntuple_names;
|
||||
#ifdef RNT_NO_GFX
|
||||
if (!args.print_to_terminal) {
|
||||
fprintf(stderr, "rntviewer was compiled without graphics support. Please use -t to enable terminal mode.\n");
|
||||
if (is_interactive) {
|
||||
fprintf(stderr, "rntviewer was compiled without graphics support. Please use -t or -n to run in terminal mode.\n");
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
@ -151,7 +152,7 @@ int main(int argc, char **argv)
|
|||
|
||||
// Watch file for changes (to adapt the displayed file size - otherwise
|
||||
// we may try to access invalid memory when the file gets shrunk)
|
||||
if (!args.print_to_terminal)
|
||||
if (is_interactive)
|
||||
os_start_file_watch(args.file_name, app);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue