Browse Source

Cocoa: avoid displaying window when command-line contains '-h' or '-help'

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 <cerbere@gmail.com>
Signed-off-by: Andreas Färber <andreas.faerber@web.de>
remotes/github/stable-0.15
Alexandre Raymond 15 years ago
committed by Andreas Färber
parent
commit
9851484f3d
  1. 3
      ui/cocoa.m

3
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")) {

Loading…
Cancel
Save