From 9851484f3d4afea83b46cc0974758ab756edfacd Mon Sep 17 00:00:00 2001 From: Alexandre Raymond Date: Sun, 29 May 2011 18:22:49 -0400 Subject: Cocoa: avoid displaying window when command-line contains '-h' or '-help' MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit There was already a check in place to avoid displaying a window in certain modes such as vnc, nographic or curses. Add a check for '-h' and '-help' to avoid displaying a window for a split- second before showing the usage information. Signed-off-by: Alexandre Raymond Signed-off-by: Andreas Färber --- ui/cocoa.m | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'ui') diff --git a/ui/cocoa.m b/ui/cocoa.m index 1ff1ac641..e1312d347 100644 --- a/ui/cocoa.m +++ b/ui/cocoa.m @@ -872,7 +872,8 @@ int main (int argc, const char * argv[]) { if (opt[1] == '-') { opt++; } - if (!strcmp(opt, "-vnc") || + if (!strcmp(opt, "-h") || !strcmp(opt, "-help") || + !strcmp(opt, "-vnc") || !strcmp(opt, "-nographic") || !strcmp(opt, "-version") || !strcmp(opt, "-curses")) { -- cgit v1.2.3