mirror of https://github.com/BOINC/boinc.git
SCR: Tweak mac screensaver for slightly better reliability.
This commit is contained in:
parent
fcafba0a87
commit
5f8c9cdeac
|
@ -370,22 +370,26 @@ OSStatus CScreensaver::initBOINCApp() {
|
|||
if (++retryCount > 3) // Limit to 3 relaunches to prevent thrashing
|
||||
return -1;
|
||||
|
||||
#ifdef _DEBUG
|
||||
err = -1;
|
||||
#else
|
||||
err = GetpathToBOINCManagerApp(boincPath, sizeof(boincPath));
|
||||
#endif
|
||||
if (err)
|
||||
{ // If we couldn't find BOINCManager.app, try default path
|
||||
strcpy(boincPath, "/Applications/");
|
||||
if (brandId)
|
||||
strcat(boincPath, m_BrandText);
|
||||
else
|
||||
strcat(boincPath, "BOINCManager");
|
||||
strcat(boincPath, ".app");
|
||||
// Find boinc client within BOINCManager.app
|
||||
// First, try default path
|
||||
strcpy(boincPath, "/Applications/");
|
||||
if (brandId) {
|
||||
strcat(boincPath, m_BrandText);
|
||||
} else {
|
||||
strcat(boincPath, "BOINCManager");
|
||||
}
|
||||
strcat(boincPath, ".app/Contents/Resources/boinc");
|
||||
|
||||
// If not at default path, search for it by creator code and bundle identifier
|
||||
if (!boinc_file_exists(boincPath)) {
|
||||
err = GetpathToBOINCManagerApp(boincPath, sizeof(boincPath));
|
||||
if (err) {
|
||||
saverState = SaverState_CantLaunchCoreClient;
|
||||
return err;
|
||||
} else {
|
||||
strcat(boincPath, "/Contents/Resources/boinc");
|
||||
}
|
||||
}
|
||||
|
||||
strcat(boincPath, "/Contents/Resources/boinc");
|
||||
|
||||
if ( (myPid = fork()) < 0)
|
||||
return -1;
|
||||
|
|
Loading…
Reference in New Issue