diff --git a/apps/openmw/mwgui/debugwindow.cpp b/apps/openmw/mwgui/debugwindow.cpp index 5d3948e76d..59f695e7f8 100644 --- a/apps/openmw/mwgui/debugwindow.cpp +++ b/apps/openmw/mwgui/debugwindow.cpp @@ -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;