Found that termous was not bing reset
This commit is contained in:
@@ -101,17 +101,19 @@ void init_termios(int args) {
|
||||
current.c_lflag &= ~ICANON;
|
||||
|
||||
if(args == 0x01) {
|
||||
//current.c_lflag |= ECHO;
|
||||
//current.c_lflag ^ ECHO;
|
||||
} else {
|
||||
//current.c_lflag &= ~ECHO;
|
||||
current.c_lflag ^= ECHO;
|
||||
//current.c_lflag |= ECHO;
|
||||
}
|
||||
|
||||
tcsetattr(0,0, ¤t);
|
||||
}
|
||||
|
||||
void reset_termios(void) {
|
||||
//current.c_lflag &= ~ECHO;
|
||||
tcsetattr(0, 0, &old);
|
||||
|
||||
tcsetattr(0, TCSANOW, &old);
|
||||
}
|
||||
|
||||
char term_getch() {
|
||||
@@ -144,6 +146,7 @@ void* input_threaded_func(void* vargp) {
|
||||
|
||||
int term_threaded_input_stop() {
|
||||
pthread_cancel(input_thread);
|
||||
reset_termios();
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user