Commits

brian  committed fa058e8

making it so we won't try to re-enter application installation

  • Participants
  • Parent commits 401c014

Comments (0)

Files changed (1)

File 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;
 }