Update textthread.cpp

This commit is contained in:
恍兮惚兮 2024-03-29 21:44:04 +08:00
parent 1fdd650147
commit 23289ffa4c

View File

@ -56,10 +56,14 @@ void TextThread::Push(BYTE* data, int length)
length = 0; length = 0;
} }
} }
auto converted = commonparsestring(data,length,&hp,Host::defaultCodepage);
if(converted)
{
buffer.append(converted.value());
if (hp.type & FULL_STRING && converted.value().size()>1) buffer.push_back(L'\n');
}
else Host::AddConsoleOutput(INVALID_CODEPAGE);
if (auto converted = commonparsestring(data,length,&hp,Host::defaultCodepage)) buffer.append(converted.value());
else Host::AddConsoleOutput(INVALID_CODEPAGE);
if (hp.type & FULL_STRING) buffer.push_back(L'\n');
lastPushTime = GetTickCount64(); lastPushTime = GetTickCount64();
if (filterRepetition) if (filterRepetition)