From 19107b2de5dda63f2a5d2aeb67f51e5dcf70f120 Mon Sep 17 00:00:00 2001 From: Nekotekina Date: Sat, 7 Mar 2020 15:26:59 +0300 Subject: [PATCH] logs.cpp: fix log format for backward compatibility Don't add prefix for first messages. --- rpcs3/util/logs.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/rpcs3/util/logs.cpp b/rpcs3/util/logs.cpp index c4bac53275..d7e4f6009e 100644 --- a/rpcs3/util/logs.cpp +++ b/rpcs3/util/logs.cpp @@ -611,6 +611,12 @@ void logs::file_listener::log(u64 stamp, const logs::message& msg, const std::st const u64 frac = (stamp % 1'000'000); fmt::append(text, "%u:%02u:%02u.%06u ", hours, mins, secs, frac); + if (msg.ch == nullptr && stamp == 0) + { + // Workaround for first special messages to keep backward compatibility + text.clear(); + } + if (!prefix.empty()) { text += "{";