From 228a648fffe8e9ab708736830987eb005f2ddd5c Mon Sep 17 00:00:00 2001 From: jonas Date: Wed, 9 Jan 2019 18:14:31 +0100 Subject: setConsoleEcho changed to using escape sequence --- cRender.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'cRender.cpp') diff --git a/cRender.cpp b/cRender.cpp index 12a4101..a01418e 100644 --- a/cRender.cpp +++ b/cRender.cpp @@ -340,13 +340,15 @@ void cRender::setConsoleEcho(bool _enable) SetConsoleMode(hStdin, mode ); #elif __linux__ - struct termios tty; + /*struct termios tty; tcgetattr(STDIN_FILENO, &tty); if( !_enable ) tty.c_lflag &= ~ECHO; else tty.c_lflag |= ECHO; - (void) tcsetattr(STDIN_FILENO, TCSANOW, &tty); + (void) tcsetattr(STDIN_FILENO, TCSANOW, &tty);*/ + + _enable ? write (STDOUT_FILENO, "\e[?8h", 5) : write (STDOUT_FILENO, "\e[?8l", 5); #endif //__linux__ } -- cgit v1.2.3