This commit is contained in:
2025-12-17 23:34:52 -05:00
parent 3095a56a01
commit 99a1caa096

View File

@@ -1,14 +1,13 @@
#include "render_animation.h" #include "render_animation.h"
#include <ranges> #include <ranges>
#include <string>
#include "log.h" #include "log.h"
#include "path_.h" #include "path_.h"
#include "process_.h" #include "process_.h"
#include "toast.h" #include "toast.h"
#include <ranges>
using namespace anm2ed::resource; using namespace anm2ed::resource;
using namespace anm2ed::util; using namespace anm2ed::util;
@@ -86,7 +85,7 @@ namespace anm2ed::imgui::wizard
if (dialog.is_selected(Dialog::FFMPEG_PATH_SET)) if (dialog.is_selected(Dialog::FFMPEG_PATH_SET))
{ {
ffmpegPath = path::to_utf8(dialog.path); ffmpegPath = dialog.path;
dialog.reset(); dialog.reset();
} }
@@ -104,7 +103,7 @@ namespace anm2ed::imgui::wizard
if (dialog.is_selected(dialogType)) if (dialog.is_selected(dialogType))
{ {
path = path::to_utf8(dialog.path); path = dialog.path;
dialog.reset(); dialog.reset();
} }
@@ -184,7 +183,7 @@ namespace anm2ed::imgui::wizard
{ {
if (!path::is_executable(ffmpegPath)) return false; if (!path::is_executable(ffmpegPath)) return false;
auto testCommand = ffmpegPath.string() + " -version"; auto testCommand = std::string("\"") + path::to_utf8(ffmpegPath) + "\" -version";
Process process(testCommand.c_str(), "r"); Process process(testCommand.c_str(), "r");
auto result = process.output_get_and_close(); auto result = process.output_get_and_close();
@@ -206,7 +205,8 @@ namespace anm2ed::imgui::wizard
auto png_format_valid_check = [&]() auto png_format_valid_check = [&]()
{ {
if (!format.string().contains("{}")) auto formatString = path::to_utf8(format);
if (!formatString.contains("{}"))
{ {
toasts.push(localize.get(TOAST_PNG_FORMAT_INVALID)); toasts.push(localize.get(TOAST_PNG_FORMAT_INVALID));
logger.error(localize.get(TOAST_PNG_FORMAT_INVALID, anm2ed::ENGLISH)); logger.error(localize.get(TOAST_PNG_FORMAT_INVALID, anm2ed::ENGLISH));
@@ -287,4 +287,4 @@ namespace anm2ed::imgui::wizard
if (ImGui::Button(localize.get(BASIC_CANCEL), widgetSize)) isEnd = true; if (ImGui::Button(localize.get(BASIC_CANCEL), widgetSize)) isEnd = true;
} }
} }