From af2bd3b70ad2dfae7dfa69c515f605aabec06fc3 Mon Sep 17 00:00:00 2001 From: Steve Checkoway Date: Wed, 13 Sep 2006 10:20:25 +0000 Subject: [PATCH] Launching via the Finder includes a single argument that looks like: -psn_0_3801089. there's some mapping between this number and pids but I don't know what off hand (or why it's even used at all). Don't pass it along to our main(). --- stepmania/src/archutils/Darwin/SMMain.mm | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/stepmania/src/archutils/Darwin/SMMain.mm b/stepmania/src/archutils/Darwin/SMMain.mm index 293360d549..ed89dba714 100755 --- a/stepmania/src/archutils/Darwin/SMMain.mm +++ b/stepmania/src/archutils/Darwin/SMMain.mm @@ -46,7 +46,10 @@ - (id) initWithArgc:(int)argc argv:(char **)argv { [super init]; - m_iArgc = argc; + if( argc == 2 && !strncmp(argv[1], "-psn_", 4) ) + m_iArgc = 1; + else + m_iArgc = argc; m_pArgv = argv; return self; }