Eric Pouech : kernel32: Only reset the console mode when it has been previously changed.

Alexandre Julliard julliard at winehq.org
Mon Sep 27 11:29:37 CDT 2010


Module: wine
Branch: master
Commit: eabe3b34b23fe62f6cfb1552d1e021ef32efcc6e
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=eabe3b34b23fe62f6cfb1552d1e021ef32efcc6e

Author: Eric Pouech <eric.pouech at orange.fr>
Date:   Fri Sep 24 21:25:06 2010 +0200

kernel32: Only reset the console mode when it has been previously changed.

---

 dlls/kernel32/console.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/dlls/kernel32/console.c b/dlls/kernel32/console.c
index 45e6089..129c4a8 100644
--- a/dlls/kernel32/console.c
+++ b/dlls/kernel32/console.c
@@ -230,7 +230,8 @@ static BOOL restore_console_mode(HANDLE hin)
     int         fd;
     BOOL        ret;
 
-    if (RtlGetCurrentPeb()->ProcessParameters->ConsoleHandle != KERNEL32_CONSOLE_SHELL)
+    if (!S_termios_raw ||
+        RtlGetCurrentPeb()->ProcessParameters->ConsoleHandle != KERNEL32_CONSOLE_SHELL)
         return TRUE;
     if ((fd = get_console_bare_fd(hin)) == -1) return FALSE;
     ret = tcsetattr(fd, TCSANOW, &S_termios) >= 0;




More information about the wine-cvs mailing list