Fix error loggig in headless mode on char16 platforms

#2235
This commit is contained in:
Wojtek Figat
2024-03-04 14:43:48 +01:00
parent 84d3103278
commit 04761c69f1
2 changed files with 6 additions and 6 deletions

View File

@@ -357,7 +357,13 @@ void PlatformBase::Error(const Char* msg)
#if PLATFORM_HAS_HEADLESS_MODE
if (CommandLine::Options.Headless)
{
#if PLATFORM_TEXT_IS_CHAR16
StringAnsi ansi(msg);
ansi += PLATFORM_LINE_TERMINATOR;
printf("Error: %s\n", ansi.Get());
#else
std::cout << "Error: " << msg << std::endl;
#endif
}
else
#endif