CONSOLE: Properly set the line output mode under windows version prior to Win10

As reported in #438 by Dave Wise.
This commit is contained in:
Mark Pizzolato 2017-05-01 17:47:07 -07:00
parent f617f63ae0
commit bf018a19d9

View file

@ -3229,7 +3229,8 @@ if ((std_input) && /* If Not Background pro
if ((std_output) && /* If Not Background process? */ if ((std_output) && /* If Not Background process? */
(std_output != INVALID_HANDLE_VALUE)) { (std_output != INVALID_HANDLE_VALUE)) {
if (GetConsoleMode(std_output, &saved_output_mode)) if (GetConsoleMode(std_output, &saved_output_mode))
SetConsoleMode(std_output, ENABLE_VIRTUAL_TERMINAL_PROCESSING|ENABLE_PROCESSED_OUTPUT); if (!SetConsoleMode(std_output, ENABLE_VIRTUAL_TERMINAL_PROCESSING|ENABLE_PROCESSED_OUTPUT))
SetConsoleMode(std_output, ENABLE_PROCESSED_OUTPUT);
} }
if (sim_log) { if (sim_log) {
fflush (sim_log); fflush (sim_log);