From 7b3b1f40b1b232852eb78fb2eadcff3a94135539 Mon Sep 17 00:00:00 2001 From: deuce <> Date: Sat, 30 Dec 2017 04:23:24 +0000 Subject: [PATCH] Fix previous commit for Windows. --- src/sbbs3/jsexec.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/sbbs3/jsexec.c b/src/sbbs3/jsexec.c index b8079d6e6c..5d45249a57 100644 --- a/src/sbbs3/jsexec.c +++ b/src/sbbs3/jsexec.c @@ -202,6 +202,8 @@ raw_tty(void) raw_input(&term); tcsetattr(fileno(stdin), TCSANOW, &term); #elif defined _WIN32 + SetConsoleMode(GetStdHandle(STD_INPUT_HANDLE), 0); +#else #warning Can't set the tty as raw on this platform #endif } @@ -1133,10 +1135,8 @@ int main(int argc, char **argv, char** environ) if(isatty(fileno(stdin))) { #ifdef __unix__ tcgetattr(fileno(stdin), &orig_term); - raw_tty(); -#else - SetConsoleMode(GetStdHandle(STD_INPUT_HANDLE), 0); #endif + raw_tty(); statfp=stderr; } else /* if redirected, don't send status messages to stderr */ -- GitLab