| ... | ... |
@@ -9,6 +9,8 @@ |
| 9 | 9 |
|
| 10 | 10 |
#include "tty.h" |
| 11 | 11 |
|
| 12 |
+#include "../config.h" |
|
| 13 |
+ |
|
| 12 | 14 |
void tty_reset(tty_t *tty) {
|
| 13 | 15 |
tcsetattr(tty->fdin, TCSANOW, &tty->original_termios); |
| 14 | 16 |
} |
| ... | ... |
@@ -89,7 +91,7 @@ char tty_getchar(tty_t *tty) {
|
| 89 | 91 |
|
| 90 | 92 |
int tty_input_ready(tty_t *tty, int pending) {
|
| 91 | 93 |
fd_set readfs; |
| 92 |
- struct timeval tv = {0, pending ? 500000 : 0};
|
|
| 94 |
+ struct timeval tv = {0, pending ? (KEYTIMEOUT * 1000) : 0};
|
|
| 93 | 95 |
FD_ZERO(&readfs); |
| 94 | 96 |
FD_SET(tty->fdin, &readfs); |
| 95 | 97 |
select(tty->fdin + 1, &readfs, NULL, NULL, &tv); |