shithub: orca

Download patch

ref: f322b9fdaa14bc1dd322891198562b9fa5a8a412
parent: 561d3ae08b6abea982c28dbc77c60d9a713770cf
author: cancel <cancel@cancel.fm>
date: Sun Dec 9 14:50:47 EST 2018

Fix wtimeout changing logic

I'm dumb, and this fixes case where key repeats were causing blocking

--- a/tui_main.c
+++ b/tui_main.c
@@ -1152,6 +1152,7 @@
       }
       if (new_timeout != cur_timeout) {
         wtimeout(stdscr, new_timeout);
+        cur_timeout = new_timeout;
       }
       //struct timespec ts;
       //ts.tv_sec = 0;
@@ -1269,6 +1270,10 @@
       break;
     }
     key = wgetch(stdscr);
+    if (cur_timeout != 0) {
+      wtimeout(stdscr, 0);
+      cur_timeout = 0;
+    }
   }
 quit:
   app_stop_all_sustained_notes(&app_state);