1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
|
pal (0.4.3-3) * pal -m used to wake up every tenth of a second. ncurses
enforces a maximum sleep time of 25.5 seconds, which is still
a lot better when you're running on battery
--- pal-0.4.3.orig/src/manage.c
+++ pal-0.4.3/src/manage.c
@@ -413,7 +413,8 @@
keypad(stdscr, TRUE); /* enable keyboard mapping */
(void) nonl(); /* tell curses not to do NL->CR/NL on output */
(void) cbreak(); /* take input chars one at a time, no wait for \n */
- (void) halfdelay(1); /* always return from getch() within a tenth of a second */
+ (void) halfdelay(255); /* try not to wake up. ncurses still forces a wakeup
+ every 25.5 seconds when in non-linebuffered-mode */
(void) noecho(); /* echo input - in color */
signal(SIGINT, pal_manage_finish); /* setup function to call on Ctrl+C */
|