From 9c0b25f6a9f7e0a0c2f8b6a4608aab68e5e6a909 Mon Sep 17 00:00:00 2001 From: Jari Vetoniemi Date: Sun, 13 Apr 2014 02:47:54 +0300 Subject: Enable noecho and raw mode. --- lib/draw/curses.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/lib/draw/curses.c b/lib/draw/curses.c index 3b160a9..7d91d36 100644 --- a/lib/draw/curses.c +++ b/lib/draw/curses.c @@ -72,6 +72,8 @@ static struct curses { int (*getmaxx)(WINDOW *win); int (*getmaxy)(WINDOW *win); int (*keypad)(WINDOW *win, bool bf); + int (*noecho)(void); + int (*raw)(void); int *ESCDELAY; int oldStdin; int oldStdout; @@ -173,6 +175,8 @@ static void _bmDrawCursesRender(const bmMenu *menu) *curses.ESCDELAY = 25; curses.keypad(curses.stdscr, true); + curses.noecho(); + curses.raw(); curses.start_color(); curses.init_pair(1, COLOR_BLACK, COLOR_RED); @@ -395,6 +399,10 @@ int _bmDrawCursesInit(struct _bmRenderApi *api) goto function_pointer_exception; if (!bmLoadFunction(keypad)) goto function_pointer_exception; + if (!bmLoadFunction(noecho)) + goto function_pointer_exception; + if (!bmLoadFunction(raw)) + goto function_pointer_exception; if (!bmLoadFunction(ESCDELAY)) goto function_pointer_exception; -- cgit v1.2.3-70-g09d2