Flush input buffer after showing menu first time.

This commit is contained in:
Jari Vetoniemi 2014-04-13 04:16:23 +03:00
parent 66a6f08c8a
commit 850a8335d5

View File

@ -79,6 +79,7 @@ static struct curses {
int (*getmaxy)(WINDOW *win);
int (*keypad)(WINDOW *win, bool bf);
int (*curs_set)(int visibility);
int (*flushinp)(void);
int (*noecho)(void);
int (*raw)(void);
int *ESCDELAY;
@ -181,6 +182,7 @@ static void _bmDrawCursesRender(const bmMenu *menu)
return;
*curses.ESCDELAY = 25;
curses.flushinp();
curses.keypad(curses.stdscr, true);
curses.curs_set(1);
curses.noecho();
@ -409,6 +411,8 @@ int _bmDrawCursesInit(struct _bmRenderApi *api)
goto function_pointer_exception;
if (!bmLoadFunction(curs_set))
goto function_pointer_exception;
if (!bmLoadFunction(flushinp))
goto function_pointer_exception;
if (!bmLoadFunction(noecho))
goto function_pointer_exception;
if (!bmLoadFunction(raw))