mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-21 05:09:34 -06:00
Revert "Merge pull request #49 from Parlane/sprintf_tidy"
Change broke the build on Debian stable. This reverts commit28755439b3
, reversing changes made to64e01ec763
.
This commit is contained in:
@ -114,6 +114,7 @@ void LogManager::Log(LogTypes::LOG_LEVELS level, LogTypes::LOG_TYPE type,
|
||||
const char *file, int line, const char *format, va_list args)
|
||||
{
|
||||
char temp[MAX_MSGLEN];
|
||||
char msg[MAX_MSGLEN * 2];
|
||||
LogContainer *log = m_Log[type];
|
||||
|
||||
if (!log->IsEnabled() || level > log->GetLevel() || ! log->HasListeners())
|
||||
@ -121,15 +122,15 @@ void LogManager::Log(LogTypes::LOG_LEVELS level, LogTypes::LOG_TYPE type,
|
||||
|
||||
CharArrayFromFormatV(temp, MAX_MSGLEN, format, args);
|
||||
|
||||
std::string msg = StringFromFormat("%s %s:%u %c[%s]: %s\n",
|
||||
Common::Timer::GetTimeFormatted().c_str(),
|
||||
file, line,
|
||||
LogTypes::LOG_LEVEL_TO_CHAR[(int)level],
|
||||
log->GetShortName(), temp);
|
||||
static const char level_to_char[7] = "-NEWID";
|
||||
sprintf(msg, "%s %s:%u %c[%s]: %s\n",
|
||||
Common::Timer::GetTimeFormatted().c_str(),
|
||||
file, line, level_to_char[(int)level],
|
||||
log->GetShortName(), temp);
|
||||
#ifdef ANDROID
|
||||
Host_SysMessage(msg.c_str());
|
||||
Host_SysMessage(msg);
|
||||
#endif
|
||||
log->Trigger(level, msg.c_str());
|
||||
log->Trigger(level, msg);
|
||||
}
|
||||
|
||||
void LogManager::Init()
|
||||
|
Reference in New Issue
Block a user