From 68bafcdda7c11d536af9173a69d12baaddb123ff Mon Sep 17 00:00:00 2001 From: Akash Mozumdar Date: Thu, 4 Oct 2018 20:00:35 -0400 Subject: [PATCH] whoops --- GUI/host/textthread.cc | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) 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