mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-04-17 20:42:29 +00:00
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
This commit is contained in:
commit
f3770a2364
@ -129,6 +129,7 @@ namespace MWGui
|
|||||||
static std::mutex sBufferMutex;
|
static std::mutex sBufferMutex;
|
||||||
static int64_t sLogStartIndex;
|
static int64_t sLogStartIndex;
|
||||||
static int64_t sLogEndIndex;
|
static int64_t sLogEndIndex;
|
||||||
|
static bool hasPrefix = false;
|
||||||
|
|
||||||
void DebugWindow::startLogRecording()
|
void DebugWindow::startLogRecording()
|
||||||
{
|
{
|
||||||
@ -170,11 +171,17 @@ namespace MWGui
|
|||||||
addChar(c);
|
addChar(c);
|
||||||
if (c == '#')
|
if (c == '#')
|
||||||
addChar(c);
|
addChar(c);
|
||||||
|
if (c == '\n')
|
||||||
|
hasPrefix = false;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
for (char c : color)
|
for (char c : color)
|
||||||
addChar(c);
|
addChar(c);
|
||||||
|
if (!hasPrefix)
|
||||||
|
{
|
||||||
addShieldedStr(prefix);
|
addShieldedStr(prefix);
|
||||||
|
hasPrefix = true;
|
||||||
|
}
|
||||||
addShieldedStr(msg);
|
addShieldedStr(msg);
|
||||||
if (bufferOverflow)
|
if (bufferOverflow)
|
||||||
sLogStartIndex = (sLogEndIndex + 1) % bufSize;
|
sLogStartIndex = (sLogEndIndex + 1) % bufSize;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user