From 5e2c4aff98225e95c43dd9294b143dcd1e9120a1 Mon Sep 17 00:00:00 2001 From: Toad King Date: Fri, 18 Sep 2020 20:25:40 -0500 Subject: [PATCH] flush console input buffer before waiting for enter key --- mono-to-stereo/main.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/mono-to-stereo/main.cpp b/mono-to-stereo/main.cpp index 57a5b93..1055ad2 100644 --- a/mono-to-stereo/main.cpp +++ b/mono-to-stereo/main.cpp @@ -101,6 +101,8 @@ int do_everything(int argc, LPCWSTR argv[]) { LOG(L"%s", L"Press Enter to quit..."); + FlushConsoleInputBuffer(hStdIn); + HANDLE rhHandles[2] = { hThread, hStdIn }; bool bKeepWaiting = true;