From: Kalle Wallin Date: Sat, 27 Mar 2004 16:34:56 +0000 (+0000) Subject: Define the read timeout in screen.h X-Git-Tag: v0.12_alpha1~643 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=d67b8aa8d9173e3331ba686220004ef05b9efa74;p=ncmpc.git Define the read timeout in screen.h git-svn-id: https://svn.musicpd.org/ncmpc/trunk@511 09075e82-0dd4-0310-85a5-a0d7c8717e4f --- diff --git a/screen.c b/screen.c index 37f5146..18feab9 100644 --- a/screen.c +++ b/screen.c @@ -298,7 +298,7 @@ screen_init(void) /* return from getch() without blocking */ // nodelay(stdscr, TRUE); keypad(stdscr, TRUE); - timeout(100); /*void wtimeout(WINDOW *win, int delay);*/ + timeout(SCREEN_TIMEOUT); if( COLSmode; switch(screen->mode) diff --git a/screen.h b/screen.h index 78ca39c..82033d8 100644 --- a/screen.h +++ b/screen.h @@ -22,6 +22,9 @@ #define SCREEN_MIN_COLS 14 #define SCREEN_MIN_ROWS 5 +/* timeout for non blocking read [ms] */ +#define SCREEN_TIMEOUT 100 + #define IS_PLAYING(s) (s==MPD_STATUS_STATE_PLAY) #define IS_PAUSED(s) (s==MPD_STATUS_STATE_PAUSE)