summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--payloads/libpayload/curses/keyboard.c10
-rw-r--r--payloads/libpayload/drivers/video/video.c2
-rw-r--r--payloads/libpayload/include/sysinfo.h1
3 files changed, 7 insertions, 6 deletions
diff --git a/payloads/libpayload/curses/keyboard.c b/payloads/libpayload/curses/keyboard.c
index 4370b280f1..92a96f8696 100644
--- a/payloads/libpayload/curses/keyboard.c
+++ b/payloads/libpayload/curses/keyboard.c
@@ -179,7 +179,7 @@ static int curses_getchar(int delay)
break;
if (delay > 0) {
- mdelay(100);
+ mdelay(1);
delay--;
}
@@ -195,15 +195,17 @@ int wgetch(WINDOW *win)
{
int delay = -1;
- if (_halfdelay || win->_delay)
- delay = win->_delay ? 0 : _halfdelay;
+ if (_halfdelay)
+ delay = _halfdelay;
+ else
+ delay = win->_delay;
return curses_getchar(delay);
}
int nodelay(WINDOW *win, NCURSES_BOOL flag)
{
- win->_delay = flag ? 1 : 0;
+ win->_delay = flag ? 0 : -1;
return 0;
}
diff --git a/payloads/libpayload/drivers/video/video.c b/payloads/libpayload/drivers/video/video.c
index 87b16b8a31..1eadce61cb 100644
--- a/payloads/libpayload/drivers/video/video.c
+++ b/payloads/libpayload/drivers/video/video.c
@@ -66,7 +66,7 @@ static void video_console_fixup_cursor(void)
if (cursory < 0)
cursory = 0;
- if (cursorx > VIDEO_COLS) {
+ if (cursorx >= VIDEO_COLS) {
cursorx = 0;
cursory++;
}
diff --git a/payloads/libpayload/include/sysinfo.h b/payloads/libpayload/include/sysinfo.h
index bcc3d5fbab..3b3a1563fd 100644
--- a/payloads/libpayload/include/sysinfo.h
+++ b/payloads/libpayload/include/sysinfo.h
@@ -54,7 +54,6 @@ struct sysinfo_t {
};
extern struct sysinfo_t lib_sysinfo;
-void lib_get_sysinfo(void);
#endif