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

2024-07-24 Thread Michael Tokarev
24.07.2024 13:25, Marc-André Lureau wrote: Hi On Wed, Jul 24, 2024 at 8:48 AM Michael Tokarev mailto:m...@tls.msk.ru>> wrote: 22.07.2024 12:52, songziming wrote: > If I use `-serial stdio` on Windows, after QEMU exits, the terminal > could not handle arrow keys and tab any more. B

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

2024-07-24 Thread Marc-André Lureau
Hi On Wed, Jul 24, 2024 at 8:48 AM Michael Tokarev wrote: > 22.07.2024 12:52, songziming wrote: > > 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 inp

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

2024-07-23 Thread Michael Tokarev
22.07.2024 12:52, songziming wrote: 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 sm

[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