diff --git a/GUI/host/textthread.cc b/GUI/host/textthread.cc index 72e69ce..531f402 100644 --- a/GUI/host/textthread.cc +++ b/GUI/host/textthread.cc @@ -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