- enhancement: the console pauser will clear STDIN when program finished
This commit is contained in:
parent
ee3864f565
commit
64ea9aad7e
|
@ -28,7 +28,7 @@ CustomMakefile =
|
||||||
IncludeVersionInfo = 0
|
IncludeVersionInfo = 0
|
||||||
SupportXPThemes = 0
|
SupportXPThemes = 0
|
||||||
CompilerSet = 0
|
CompilerSet = 0
|
||||||
CompilerSettings = 000000a000110000000010000
|
CompilerSettings = 000000a000110000000001000
|
||||||
UnitCount = 1
|
UnitCount = 1
|
||||||
UsePrecompiledHeader = 0
|
UsePrecompiledHeader = 0
|
||||||
PrecompiledHeader =
|
PrecompiledHeader =
|
||||||
|
|
|
@ -61,6 +61,8 @@ void PauseExit(int exitcode, bool reInp) {
|
||||||
SetStdHandle(STD_INPUT_HANDLE,hInp);
|
SetStdHandle(STD_INPUT_HANDLE,hInp);
|
||||||
freopen("CONIN$","r",stdin);
|
freopen("CONIN$","r",stdin);
|
||||||
}
|
}
|
||||||
|
FlushConsoleInputBuffer(GetStdHandle(STD_INPUT_HANDLE));
|
||||||
|
fflush(stdin);
|
||||||
printf("\n");
|
printf("\n");
|
||||||
printf("Press ANY key to exit...");
|
printf("Press ANY key to exit...");
|
||||||
getch();
|
getch();
|
||||||
|
|
Loading…
Reference in New Issue