From: Timo Korvola Date: Sat, 27 Jan 2018 22:21:59 +0000 (+0200) Subject: Check for resize after getch. X-Git-Url: https://scope-eye.net/git/?a=commitdiff_plain;h=70f7f55ef43a13eace39e2f59c23f11fb1ed3880;p=liskon_frotz.git Check for resize after getch. Most of the time is spent in getch, so that is when we'll likely get SIGWINCH. --- diff --git a/src/curses/ux_input.c b/src/curses/ux_input.c index 70b9b70..b4c404b 100644 --- a/src/curses/ux_input.c +++ b/src/curses/ux_input.c @@ -130,12 +130,12 @@ static int unix_read_char(int extkeys) int c; while(1) { + timeout( timeout_to_ms()); + c = getch(); while (terminal_resized) { terminal_resized = 0; unix_resize_display(); } - timeout( timeout_to_ms()); - c = getch(); /* Catch 98% of all input right here... */ if ((c >= ZC_ASCII_MIN && c <= ZC_ASCII_MAX)