- enhancement: the console pauser will clear STDIN when program finished

This commit is contained in:
Roy Qu 2021-12-09 07:15:55 +08:00
parent ee3864f565
commit 64ea9aad7e
2 changed files with 3 additions and 1 deletions

View File

@ -28,7 +28,7 @@ CustomMakefile =
IncludeVersionInfo = 0
SupportXPThemes = 0
CompilerSet = 0
CompilerSettings = 000000a000110000000010000
CompilerSettings = 000000a000110000000001000
UnitCount = 1
UsePrecompiledHeader = 0
PrecompiledHeader =

View File

@ -61,6 +61,8 @@ void PauseExit(int exitcode, bool reInp) {
SetStdHandle(STD_INPUT_HANDLE,hInp);
freopen("CONIN$","r",stdin);
}
FlushConsoleInputBuffer(GetStdHandle(STD_INPUT_HANDLE));
fflush(stdin);
printf("\n");
printf("Press ANY key to exit...");
getch();