fix sound serialization + extended format

This commit is contained in:
shweet committed 2026-07-15 12:47:44 -04:00
1 parent c7abe29106
commit 98f87c9d46
9 files changed
+59 -9

No files matched your search

+3 -1
View File
@@ -150,7 +150,9 @@ namespace anm2ed::imgui
document.lastAutosaveTime += ImGui::GetIO().DeltaTime;
if (document.lastAutosaveTime > time::SECOND_M)
{
manager.command_push({i, [](Manager& manager, Document& document) { manager.autosave(document); }});
auto options = settings.anm2_options_get();
manager.command_push({i, [options](Manager& manager, Document& document)
{ manager.autosave(document, options); }});
}
}
}
+4 -4
View File
@@ -29,27 +29,27 @@ namespace anm2ed::imgui
bool Taskbar::save_execute(Manager& manager, const PendingSave& request)
{
return manager.save(request.index, request.path);
return manager.save(request.index, request.path, request.options);
}
void Taskbar::save_enqueue(Manager& manager, const PendingSave& request)
{
auto index = request.index;
auto path = request.path;
auto options = request.options;
manager.command_push({.runManager =
[=](Manager& manager)
{ manager.save(index, path); }});
{ manager.save(index, path, options); }});
}
bool Taskbar::save_request(Manager& manager, Settings& settings, int index, const std::filesystem::path& path,
bool isQueued)
{
(void)settings;
auto* document = manager.get(index);
if (!document) return false;
PendingSave request{.index = index, .path = path};
PendingSave request{.index = index, .path = path, .options = settings.anm2_options_get()};
if (isQueued)
{
save_enqueue(manager, request);
+1
View File
@@ -24,6 +24,7 @@ namespace anm2ed::imgui
{
int index{-1};
std::filesystem::path path{};
Options options{};
bool isQueued{};
};
+4
View File
@@ -71,6 +71,10 @@ namespace anm2ed::imgui::wizard
ImGui::SeparatorText(localize.get(LABEL_OPTIONS));
ImGui::Checkbox(localize.get(LABEL_OVERWRITE_WARNING), &temporary.fileIsWarnOverwrite);
ImGui::SetItemTooltip("%s", localize.get(TOOLTIP_OVERWRITE_WARNING));
ImGui::SeparatorText(localize.get(LABEL_SERIALIZATION));
ImGui::Checkbox(localize.get(LABEL_EXTENDED_FORMAT), &temporary.isFileExtendedFormat);
ImGui::SetItemTooltip("%s", localize.get(TOOLTIP_EXTENDED_FORMAT));
}
ImGui::EndChild();