Mercurial > sdl-ios-xcode
diff src/main/macosx/SDLMain.m @ 1125:a6011e1394d9
Apparently MacOS X will sometimes pass command line arguments to a Cocoa
app as an openFile() message, so we have to make sure we were launched from
the Finder before accepting these as drag'n'drop documents, or they will just
duplicate what's already in argc/argv.
author | Ryan C. Gordon <icculus@icculus.org> |
---|---|
date | Mon, 22 Aug 2005 14:18:15 +0000 |
parents | 39408f59a0f7 |
children | 304d8dd6a989 |
line wrap: on
line diff
--- a/src/main/macosx/SDLMain.m Sun Aug 21 08:02:23 2005 +0000 +++ b/src/main/macosx/SDLMain.m Mon Aug 22 14:18:15 2005 +0000 @@ -245,6 +245,9 @@ */ - (BOOL)application:(NSApplication *)theApplication openFile:(NSString *)filename { + if (!gFinderLaunch) /* MacOS is passing command line args. */ + return FALSE; + if (gCalledAppMainline) /* app has started, ignore this document. */ return FALSE;