Switched to cfmakeraw
This commit is contained in:
parent
98d4ec011f
commit
d50a05a566
|
@ -9,8 +9,9 @@ int _getch(void)
|
||||||
int ch;
|
int ch;
|
||||||
tcgetattr( STDIN_FILENO, &oldattr );
|
tcgetattr( STDIN_FILENO, &oldattr );
|
||||||
newattr = oldattr;
|
newattr = oldattr;
|
||||||
newattr.c_lflag &= ~( ICANON | ECHO );
|
cfmakeraw(&newattr);
|
||||||
tcsetattr( STDIN_FILENO, TCSANOW, &newattr );
|
//newattr.c_lflag &= ~( ICANON | ECHO );
|
||||||
|
//tcsetattr( STDIN_FILENO, TCSANOW, &newattr );
|
||||||
ch = getchar();
|
ch = getchar();
|
||||||
tcsetattr( STDIN_FILENO, TCSANOW, &oldattr );
|
tcsetattr( STDIN_FILENO, TCSANOW, &oldattr );
|
||||||
return ch;
|
return ch;
|
||||||
|
|
Binary file not shown.
Loading…
Reference in New Issue