summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar jonas <himself@jonasgunz.de> 2019-01-09 18:14:31 +0100
committerGravatar jonas <himself@jonasgunz.de> 2019-01-09 18:14:31 +0100
commit228a648fffe8e9ab708736830987eb005f2ddd5c (patch)
treec3f5601d31efc515745a728a0aa6214ba34f989e
parent75baef0cb96f65c500ac87cf71ebe5e05c0dae0d (diff)
downloadtermgl-228a648fffe8e9ab708736830987eb005f2ddd5c.tar.gz
setConsoleEcho changed to using escape sequence
-rw-r--r--cRender.cpp6
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__
}