Browse Source

Disable crash warning dialog in dev mode.

tags/v1.1.6
Andrew Belt 5 years ago
parent
commit
e248cc8813
1 changed files with 10 additions and 8 deletions
  1. +10
    -8
      src/patch.cpp

+ 10
- 8
src/patch.cpp View File

@@ -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


Loading…
Cancel
Save