Skip to content

Commit

Permalink
Fix error loggig in headless mode on char16 platforms
Browse files Browse the repository at this point in the history
  • Loading branch information
mafiesto4 committed Mar 4, 2024
1 parent 84d3103 commit 04761c6
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 0 additions & 6 deletions Source/Editor/Managed/ManagedEditor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -278,13 +278,7 @@ void ManagedEditor::Update()
void ManagedEditor::Exit()
{
if (WasExitCalled)
{
// Ups xD
LOG(Warning, "Managed Editor exit called after exit or before init.");
return;
}

// Set flag
WasExitCalled = true;

// Skip if managed object is missing
Expand Down
6 changes: 6 additions & 0 deletions Source/Engine/Platform/Base/PlatformBase.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 04761c6

Please sign in to comment.