Commit eabe3b34 authored by Eric Pouech's avatar Eric Pouech Committed by Alexandre Julliard

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

parent 1264ec93
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment