mirror of
https://github.com/yawut/SDL.git
synced 2026-08-09 20:17:38 -05:00
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.
This commit is contained in:
parent
8a33986f93
commit
1056c1fa5b
|
|
@ -245,6 +245,9 @@ static void CustomApplicationMain (argc, argv)
|
|||
*/
|
||||
- (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;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user