Add SaveAllPalettes, SaveWithChangeQueue exp flags

This commit is contained in:
scawful
2023-11-18 20:04:54 -05:00
parent fee9484a5d
commit 82952e2e73
2 changed files with 14 additions and 5 deletions

View File

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