Switched to cfmakeraw

This commit is contained in:
R. Eric Wheeler 2021-01-07 14:43:35 -08:00
parent 98d4ec011f
commit d50a05a566
2 changed files with 3 additions and 2 deletions

View File

@ -9,8 +9,9 @@ int _getch(void)
int ch;
tcgetattr( STDIN_FILENO, &oldattr );
newattr = oldattr;
newattr.c_lflag &= ~( ICANON | ECHO );
tcsetattr( STDIN_FILENO, TCSANOW, &newattr );
cfmakeraw(&newattr);
//newattr.c_lflag &= ~( ICANON | ECHO );
//tcsetattr( STDIN_FILENO, TCSANOW, &newattr );
ch = getchar();
tcsetattr( STDIN_FILENO, TCSANOW, &oldattr );
return ch;

Binary file not shown.