Browse Source

Save autosave patch on close in PatchManager instead of standalone adapter.

tags/v2.0.0
Andrew Belt 3 years ago
parent
commit
d84847995e
2 changed files with 4 additions and 3 deletions
  1. +0
    -3
      adapters/standalone.cpp
  2. +4
    -0
      src/patch.cpp

+ 0
- 3
adapters/standalone.cpp View File

@@ -239,9 +239,6 @@ int main(int argc, char* argv[]) {
} }


// Destroy context // Destroy context
if (!settings::headless) {
APP->patch->saveAutosave();
}
INFO("Destroying context"); INFO("Destroying context");
delete APP; delete APP;
contextSet(NULL); contextSet(NULL);


+ 4
- 0
src/patch.cpp View File

@@ -32,6 +32,10 @@ Manager::Manager() {
Manager::~Manager() { Manager::~Manager() {
// Dispatch onSave to all Modules so they save their patch storage, etc. // Dispatch onSave to all Modules so they save their patch storage, etc.
APP->engine->prepareSave(); APP->engine->prepareSave();
// Save autosave if not headless
if (!settings::headless) {
APP->patch->saveAutosave();
}
cleanAutosave(); cleanAutosave();
} }




Loading…
Cancel
Save