From bdaba41cbe7f10c750c31b66dd2696e6b6ea7436 Mon Sep 17 00:00:00 2001 From: dam Date: Mon, 16 Oct 2023 01:23:40 +0100 Subject: Improved input reading to wait for event instead of pooling. --- TUI/unix.jai | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'TUI/unix.jai') diff --git a/TUI/unix.jai b/TUI/unix.jai index 1bfa400..523aeb5 100644 --- a/TUI/unix.jai +++ b/TUI/unix.jai @@ -135,8 +135,8 @@ OS_prepare_terminal :: () { raw_tio_mode.c_lflag &= ~(.ECHO | .ECHONL | .ICANON | .ISIG | .IEXTEN); raw_tio_mode.c_cflag &= ~(.CSIZE | .PARENB); raw_tio_mode.c_cflag |= .CS8; - raw_tio_mode.c_cc[Control_Chars.VMIN] = 0; - raw_tio_mode.c_cc[Control_Chars.VTIME] = 1; + raw_tio_mode.c_cc[Control_Chars.VMIN] = 1; + raw_tio_mode.c_cc[Control_Chars.VTIME] = 0; tcsetattr(STDIN_FILENO, 0, *raw_tio_mode); // TODO Log on error. } -- cgit v1.2.3