Minor changes

This commit is contained in:
InoriRus
2021-12-29 18:09:27 +10:00
parent 037431589f
commit 435a26c591
31 changed files with 1817 additions and 645 deletions
+29
View File
@@ -167,6 +167,35 @@ void SetOutputFile(const String& file_name, Core::File::Encoding enc)
} // namespace Log
void emu_printf(const char* format, ...)
{
EXIT_IF(!Log::g_log_initialized);
EXIT_IF(Log::g_mutex == nullptr);
Log::g_mutex->Lock();
{
va_list args {};
va_start(args, format);
String s;
s.Printf(format, args);
va_end(args);
if (!Log::g_colored_printf)
{
s = Log::RemoveColors(s);
}
::printf("%s", s.C_Str());
if (Log::g_dir == Log::Direction::File && Log::g_file != nullptr)
{
Log::g_file->Write(s);
}
}
Log::g_mutex->Unlock();
}
void printf(const char* format, ...)
{
EXIT_IF(!Log::g_log_initialized);