On 27/09/2011 15:31, Paolo Bonzini wrote: > On 09/27/2011 03:14 PM, Fabien Chouteau wrote: >> + /* Some terminal emulator returns \r\n for Enter, just pass \n */ >> + if (win_stdio_buf == '\r') { >> + continue; >> + } > > Does the \r actually do any damage? >
It's just more convenient to have the same behavior on all hosts (i.e. no \r). >> +static void qemu_chr_set_echo_win_stdio(CharDriverState *chr, bool echo) >> +{ >> + DWORD mode = 0; >> + >> + GetConsoleMode(hStdIn, &mode); >> + >> + if (echo) { >> + SetConsoleMode(hStdIn, mode | (ENABLE_ECHO_INPUT)); >> + } else { >> + SetConsoleMode(hStdIn, mode & (~ENABLE_ECHO_INPUT)); >> + } >> +} > > You also need to enable ENABLE_LINE_INPUT for ENABLE_ECHO_INPUT to have > effect. > OK thanks, I missed that... Regards, -- Fabien Chouteau