Merge branch 'i-know-what-time-it-is' into 'master'

Fix(Log): Don't Put Timestamps Mid-Message

Closes #6982

See merge request OpenMW/openmw!3593
macos_ci_fix
Zackhasacat 1 year ago
commit f3770a2364

@ -129,6 +129,7 @@ namespace MWGui
static std::mutex sBufferMutex;
static int64_t sLogStartIndex;
static int64_t sLogEndIndex;
static bool hasPrefix = false;
void DebugWindow::startLogRecording()
{
@ -170,11 +171,17 @@ namespace MWGui
addChar(c);
if (c == '#')
addChar(c);
if (c == '\n')
hasPrefix = false;
}
};
for (char c : color)
addChar(c);
addShieldedStr(prefix);
if (!hasPrefix)
{
addShieldedStr(prefix);
hasPrefix = true;
}
addShieldedStr(msg);
if (bufferOverflow)
sLogStartIndex = (sLogEndIndex + 1) % bufSize;

Loading…
Cancel
Save