Fixes
This commit is contained in:
@@ -2,10 +2,20 @@
|
||||
|
||||
#include "NativeHandles.h"
|
||||
|
||||
#include <string>
|
||||
#include <windows.h>
|
||||
|
||||
namespace RenderCadenceCompositor
|
||||
{
|
||||
namespace
|
||||
{
|
||||
std::string LastWindowsErrorText()
|
||||
{
|
||||
const DWORD errorCode = GetLastError();
|
||||
return std::to_string(static_cast<unsigned long>(errorCode));
|
||||
}
|
||||
}
|
||||
|
||||
bool FontAtlasBuilder::RunProcess(const std::string& commandLine, const std::filesystem::path& workingDirectory, std::string& error)
|
||||
{
|
||||
STARTUPINFOA startupInfo = {};
|
||||
@@ -17,7 +27,7 @@ bool FontAtlasBuilder::RunProcess(const std::string& commandLine, const std::fil
|
||||
|
||||
if (!CreateProcessA(nullptr, mutableCommandLine.data(), nullptr, nullptr, FALSE, CREATE_NO_WINDOW, nullptr, workingDirectory.string().c_str(), &startupInfo, &processInfo))
|
||||
{
|
||||
error = "Failed to launch msdf-atlas-gen.exe.";
|
||||
error = "Failed to launch msdf-atlas-gen.exe. Windows error: " + LastWindowsErrorText() + ".";
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -29,7 +39,7 @@ bool FontAtlasBuilder::RunProcess(const std::string& commandLine, const std::fil
|
||||
GetExitCodeProcess(processHandle.get(), &exitCode);
|
||||
if (exitCode != 0)
|
||||
{
|
||||
error = "msdf-atlas-gen.exe returned a non-zero exit code.";
|
||||
error = "msdf-atlas-gen.exe returned a non-zero exit code: " + std::to_string(static_cast<unsigned long>(exitCode)) + ".";
|
||||
return false;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user