Switched to cfmakeraw
This commit is contained in:
parent
98d4ec011f
commit
d50a05a566
|
@ -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.
Loading…
Reference in New Issue