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?

+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.

Paolo

Reply via email to