From a4a8ad00d59d62eb0122c966ff79b4b4e7e3f308 Mon Sep 17 00:00:00 2001 From: Lior Halphon Date: Thu, 6 May 2021 00:26:45 +0300 Subject: [PATCH] Display usage on invalid options --- SDL/main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SDL/main.c b/SDL/main.c index 5afc6dea..97884d5d 100644 --- a/SDL/main.c +++ b/SDL/main.c @@ -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); }