This commit is contained in:
Akash Mozumdar 2018-10-04 20:00:35 -04:00
parent effe03fd96
commit 68bafcdda7

View File

@ -48,8 +48,7 @@ void TextThread::AddText(const BYTE* data, int len)
flusher = std::thread([&]
{
ResetEvent(cancelFlushEvent);
WaitForSingleObject(cancelFlushEvent, FlushDelay);
Flush();
if (WaitForSingleObject(cancelFlushEvent, FlushDelay) == WAIT_TIMEOUT) Flush();
});
LOCK(ttMutex);
buffer += status & USING_UNICODE