|
|
@@ -33,14 +33,16 @@ void PatchManager::init(std::string path) { |
|
|
|
return; |
|
|
|
} |
|
|
|
|
|
|
|
// To prevent launch crashes, if Rack crashes between now and 15 seconds from now, the "skipAutosaveOnLaunch" property will remain in settings.json, so that in the next launch, the broken autosave will not be loaded. |
|
|
|
bool oldSkipLoadOnLaunch = settings::skipLoadOnLaunch; |
|
|
|
settings::skipLoadOnLaunch = true; |
|
|
|
settings::save(asset::settingsPath); |
|
|
|
settings::skipLoadOnLaunch = false; |
|
|
|
if (oldSkipLoadOnLaunch && osdialog_message(OSDIALOG_INFO, OSDIALOG_YES_NO, "Rack has recovered from a crash, possibly caused by a faulty module in your patch. Clear your patch and start over?")) { |
|
|
|
this->path = ""; |
|
|
|
return; |
|
|
|
if (!settings::devMode) { |
|
|
|
// To prevent launch crashes, if Rack crashes between now and 15 seconds from now, the "skipAutosaveOnLaunch" property will remain in settings.json, so that in the next launch, the broken autosave will not be loaded. |
|
|
|
bool oldSkipLoadOnLaunch = settings::skipLoadOnLaunch; |
|
|
|
settings::skipLoadOnLaunch = true; |
|
|
|
settings::save(asset::settingsPath); |
|
|
|
settings::skipLoadOnLaunch = false; |
|
|
|
if (oldSkipLoadOnLaunch && osdialog_message(OSDIALOG_INFO, OSDIALOG_YES_NO, "Rack has recovered from a crash, possibly caused by a faulty module in your patch. Clear your patch and start over?")) { |
|
|
|
this->path = ""; |
|
|
|
return; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
// Load autosave |
|
|
|