From f322b9fdaa14bc1dd322891198562b9fa5a8a412 Mon Sep 17 00:00:00 2001 From: cancel Date: Sun, 9 Dec 2018 19:50:47 +0900 Subject: [PATCH] Fix wtimeout changing logic I'm dumb, and this fixes case where key repeats were causing blocking --- tui_main.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tui_main.c b/tui_main.c index c919771..96affe5 100644 --- a/tui_main.c +++ b/tui_main.c @@ -1152,6 +1152,7 @@ int main(int argc, char** argv) { } if (new_timeout != cur_timeout) { wtimeout(stdscr, new_timeout); + cur_timeout = new_timeout; } //struct timespec ts; //ts.tv_sec = 0; @@ -1269,6 +1270,10 @@ int main(int argc, char** argv) { break; } key = wgetch(stdscr); + if (cur_timeout != 0) { + wtimeout(stdscr, 0); + cur_timeout = 0; + } } quit: app_stop_all_sustained_notes(&app_state);