mirror of
https://github.com/vivier/EMILE.git
synced 2024-12-21 18:30:20 +00:00
replace getchar() by console_getchar()
This commit is contained in:
parent
8d02f4dac4
commit
c00938b25e
@ -27,6 +27,8 @@ extern void console_video_inverse(void);
|
||||
extern void console_video_normal(void);
|
||||
extern void console_select_charset(char c);
|
||||
extern void console_cursor_off();
|
||||
extern int console_getchar(void);
|
||||
extern int console_keypressed(int timeout);
|
||||
|
||||
extern void emile_window(emile_window_t *win);
|
||||
extern emile_progressbar_t* emile_progressbar_create(emile_window_t *win, int max);
|
||||
|
@ -47,14 +47,17 @@ int emile_scrolllist(emile_window_t *win, emile_list_t *list)
|
||||
emile_window(win);
|
||||
display_list(win, list, base);
|
||||
|
||||
while((c = getchar()) != -1)
|
||||
while(1)
|
||||
{
|
||||
c = console_getchar();
|
||||
if (c == -1)
|
||||
break;
|
||||
if (c == '\033')
|
||||
{
|
||||
c = getchar();
|
||||
c = console_getchar();
|
||||
if (c != '[')
|
||||
continue;
|
||||
c = getchar();
|
||||
c = console_getchar();
|
||||
if ( (c == 'B') && (list->current < list->nb - 1) )
|
||||
{
|
||||
list->current++;
|
||||
@ -72,6 +75,8 @@ int emile_scrolllist(emile_window_t *win, emile_list_t *list)
|
||||
}
|
||||
else
|
||||
break;
|
||||
console_keypressed(0);
|
||||
}
|
||||
|
||||
return c;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user