Add SaveAllPalettes, SaveWithChangeQueue exp flags
This commit is contained in:
@@ -25,6 +25,10 @@ class ExperimentFlags {
|
|||||||
// handled manually by controller class but should be
|
// handled manually by controller class but should be
|
||||||
// ported away from that eventually.
|
// ported away from that eventually.
|
||||||
bool kUseNewImGuiInput = false;
|
bool kUseNewImGuiInput = false;
|
||||||
|
|
||||||
|
bool kSaveAllPalettes = false;
|
||||||
|
|
||||||
|
bool kSaveWithChangeQueue = false;
|
||||||
};
|
};
|
||||||
|
|
||||||
ExperimentFlags() = default;
|
ExperimentFlags() = default;
|
||||||
|
|||||||
@@ -405,12 +405,17 @@ absl::Status ROM::SaveToFile(bool backup, absl::string_view filename) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Run the other save functions
|
// Run the other save functions
|
||||||
// SaveAllPalettes();
|
if (flags()->kSaveAllPalettes) {
|
||||||
|
SaveAllPalettes();
|
||||||
|
}
|
||||||
|
|
||||||
|
if (flags()->kSaveWithChangeQueue) {
|
||||||
while (!changes_.empty()) {
|
while (!changes_.empty()) {
|
||||||
auto change = changes_.top();
|
auto change = changes_.top();
|
||||||
change();
|
change();
|
||||||
changes_.pop();
|
changes_.pop();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Open the file that we know exists for writing
|
// Open the file that we know exists for writing
|
||||||
std::ofstream file(filename.data(), std::ios::binary);
|
std::ofstream file(filename.data(), std::ios::binary);
|
||||||
|
|||||||
Reference in New Issue
Block a user