Skip to content
This repository has been archived by the owner on Feb 15, 2024. It is now read-only.

Commit

Permalink
flush console input buffer before waiting for enter key
Browse files Browse the repository at this point in the history
  • Loading branch information
ToadKing committed Sep 19, 2020
1 parent ed04a49 commit 5e2c4af
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions mono-to-stereo/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 5e2c4af

Please sign in to comment.