Source

pygame / src / sdlmain_osx.m

Diff from to

src/sdlmain_osx.m

 extern OSErr CPSSetFrontProcess( CPSProcessSerNum *psn);
 extern OSErr CPSSetProcessName ( CPSProcessSerNum *psn, const char *processname );
 
+static bool HasInstalledApplication = 0;
+
 static NSString *getApplicationName(void)
 {
     const NSDictionary *dict;
 static PyObject*
 _RunningFromBundleWithNSApplication(PyObject* self)
 {
+	if (HasInstalledApplication)
+	{
+		Py_RETURN_TRUE;
+	}
 	CFBundleRef MainBundle = CFBundleGetMainBundle();
 	if (MainBundle != NULL)
 	{
     [NSApp updateWindows];
     [NSApp activateIgnoringOtherApps:true];
 
+    HasInstalledApplication = 1;
+    
 	Py_RETURN_TRUE;
 }