diff options
author | jonas <himself@jonasgunz.de> | 2019-01-09 18:14:31 +0100 |
---|---|---|
committer | jonas <himself@jonasgunz.de> | 2019-01-09 18:14:31 +0100 |
commit | 228a648fffe8e9ab708736830987eb005f2ddd5c (patch) | |
tree | c3f5601d31efc515745a728a0aa6214ba34f989e | |
parent | 75baef0cb96f65c500ac87cf71ebe5e05c0dae0d (diff) | |
download | termgl-228a648fffe8e9ab708736830987eb005f2ddd5c.tar.gz |
setConsoleEcho changed to using escape sequence
-rw-r--r-- | cRender.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
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__ } |