[PATCH v2] chardev/char-win-stdio.c: restore old console mode

2024-07-22 Thread songziming
If I use `-serial stdio` on Windows, after QEMU exits, the terminal could not handle arrow keys and tab any more. Because stdio backend on Windows sets console mode to virtual terminal input when starts, but does not restore the old mode when finalize. This small patch saves the old console mode a

[PATCH] chardev/char-win-stdio.c: restore old console mode

2024-07-22 Thread songziming
Hi I've updated the patch. Now it only reset mode if handle is valid. Signed-off-by: Ziming Song --- chardev/char-win-stdio.c | 5 + 1 file changed, 5 insertions(+) diff --git a/chardev/char-win-stdio.c b/chardev/char-win-stdio.c index 1a18999..13325ca 100644 --- a/chardev/char-win-stdio

[PATCH] chardev/char-win-stdio.c: restore old console mode

2024-07-21 Thread songziming
If I use `-serial stdio` on Windows, after QEMU exits, the terminal could not handle arrow keys and tab any more. Because stdio backend on Windows sets console mode to virtual terminal input when starts, but does not restore the old mode when finalize. This small patch saves the old console mode a