debugging getche()

This commit is contained in:
Calson Noah 2017-05-19 09:33:16 +01:00
parent a89100c839
commit ccce0633c4

View File

@ -198,7 +198,7 @@ extern int getche(void)
newattr = oldattr; newattr = oldattr;
newattr.c_lflag &= ~( ICANON | ECHO);//shell out to kill echo newattr.c_lflag &= ~( ICANON | ECHO);//shell out to kill echo
tcsetattr( STDIN_FILENO, TCSANOW, &newattr ); tcsetattr( STDIN_FILENO, TCSANOW, &newattr );
system("stty echo");//shell out to kill echo system("stty -echo");//shell out to kill echo
ch = getchar(); ch = getchar();
tcsetattr( STDIN_FILENO, TCSANOW, &oldattr ); tcsetattr( STDIN_FILENO, TCSANOW, &oldattr );
return ch; return ch;