summaryrefslogtreecommitdiffstats
path: root/ui/ncurses/nc-scr.c
diff options
context:
space:
mode:
authorJeremy Kerr <jk@ozlabs.org>2013-05-17 10:02:41 +0800
committerJeremy Kerr <jk@ozlabs.org>2013-05-21 15:29:43 +0800
commita610837ff38f5cc80bcbad465a80ab920e67927d (patch)
tree3e157da8508053daef1d400e8dfa3ec7c48e9f56 /ui/ncurses/nc-scr.c
parent3461b6ad5cb90f1448360d0eb04dd661ae477610 (diff)
downloadtalos-petitboot-a610837ff38f5cc80bcbad465a80ab920e67927d.tar.gz
talos-petitboot-a610837ff38f5cc80bcbad465a80ab920e67927d.zip
ui/ncurses: move getch() out of process_key callbacks
All process_key callbacks will want to query the key that was pressed, so do the getch() once in cui_process_key, and pass the result to the callback. Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
Diffstat (limited to 'ui/ncurses/nc-scr.c')
-rw-r--r--ui/ncurses/nc-scr.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ui/ncurses/nc-scr.c b/ui/ncurses/nc-scr.c
index 3966e95..062d34a 100644
--- a/ui/ncurses/nc-scr.c
+++ b/ui/ncurses/nc-scr.c
@@ -102,7 +102,7 @@ void nc_scr_status_printf(struct nc_scr *scr, const char *format, ...)
int nc_scr_init(struct nc_scr *scr, enum pb_nc_sig sig, int begin_x,
void *ui_ctx,
- void (*process_key)(struct nc_scr *),
+ void (*process_key)(struct nc_scr *, int),
int (*post)(struct nc_scr *),
int (*unpost)(struct nc_scr *),
void (*resize)(struct nc_scr *))
OpenPOWER on IntegriCloud