diff options
Diffstat (limited to 'modules')
-rw-r--r-- | modules/wincons/wincons.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/modules/wincons/wincons.c b/modules/wincons/wincons.c index 7b7f275..769705a 100644 --- a/modules/wincons/wincons.c +++ b/modules/wincons/wincons.c @@ -43,6 +43,7 @@ static void destructor(void *arg) SetConsoleMode(GetStdHandle(STD_INPUT_HANDLE), st->mode); st->run = false; + WaitForSingleObject(st->hThread, 5000); CloseHandle(st->hThread); tmr_cancel(&st->tmr); @@ -102,6 +103,10 @@ static DWORD WINAPI input_thread(LPVOID arg) if (ch == '\r') ch = '\n'; + /* Special handling of 'q' (quit) */ + if (ch == 'q') + st->run = false; + /* * The keys are read from a thread so we have * to send them to the RE main event loop via |