diff --git a/src/app/core/common.h b/src/app/core/common.h index f9913e89..9f5075f3 100644 --- a/src/app/core/common.h +++ b/src/app/core/common.h @@ -25,6 +25,10 @@ class ExperimentFlags { // handled manually by controller class but should be // ported away from that eventually. bool kUseNewImGuiInput = false; + + bool kSaveAllPalettes = false; + + bool kSaveWithChangeQueue = false; }; ExperimentFlags() = default; diff --git a/src/app/rom.cc b/src/app/rom.cc index af0742ca..d6e3aa89 100644 --- a/src/app/rom.cc +++ b/src/app/rom.cc @@ -405,11 +405,16 @@ absl::Status ROM::SaveToFile(bool backup, absl::string_view filename) { } // Run the other save functions - // SaveAllPalettes(); - while (!changes_.empty()) { - auto change = changes_.top(); - change(); - changes_.pop(); + if (flags()->kSaveAllPalettes) { + SaveAllPalettes(); + } + + if (flags()->kSaveWithChangeQueue) { + while (!changes_.empty()) { + auto change = changes_.top(); + change(); + changes_.pop(); + } } // Open the file that we know exists for writing