]> git.ipfire.org Git - thirdparty/qemu.git/commit
chardev/char-win-stdio.c: restore old console mode
authorsongziming <s.ziming@hotmail.com>
Mon, 22 Jul 2024 09:52:55 +0000 (17:52 +0800)
committerMichael Tokarev <mjt@tls.msk.ru>
Tue, 27 Aug 2024 19:13:46 +0000 (22:13 +0300)
commitd699ffd0eb29e07eb99e2149231b3915b633a0e9
treeef1fc38ff957df5561631276fa1031593e57c361
parenta9835528692d91f0e1c7ed2093bb2c503eac8681
chardev/char-win-stdio.c: restore old console mode

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 and set it back.

Signed-off-by: Ziming Song <s.ziming@hotmail.com>
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Message-ID: <ME3P282MB25488BE7C39BF0C35CD0DA5D8CA82@ME3P282MB2548.AUSP282.PROD.OUTLOOK.COM>
(cherry picked from commit 903cc9e1173e0778caa50871e8275c898770c690)
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
chardev/char-win-stdio.c