Display usage on invalid options

This commit is contained in:
Lior Halphon 2021-05-06 00:26:45 +03:00
parent 0dff3ef144
commit a4a8ad00d5

View File

@ -644,7 +644,7 @@ int main(int argc, char **argv)
bool fullscreen = get_arg_flag("--fullscreen", &argc, argv);
bool nogl = get_arg_flag("--nogl", &argc, argv);
if (argc > 2) {
if (argc > 2 || (argc == 2 && argv[1][0] == '-')) {
fprintf(stderr, "Usage: %s [--fullscreen] [--nogl] [rom]\n", argv[0]);
exit(1);
}