Found that termous was not bing reset

This commit is contained in:
2025-05-31 23:02:26 +00:00
parent b6a50cf942
commit 8cef088b61
4 changed files with 102 additions and 73 deletions

View File

@@ -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, &current);
}
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;
}