mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-10-13 18:17:39 -04:00
Removed cursor flicker
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@648 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
d1d5f95488
commit
c42644d2f4
1 changed files with 5 additions and 8 deletions
13
apps/menu.c
13
apps/menu.c
|
@ -90,18 +90,17 @@ void menu_init(struct menu_items* mitems, int count)
|
||||||
menu_top = items[0].id;
|
menu_top = items[0].id;
|
||||||
menu_bottom = count-1;
|
menu_bottom = count-1;
|
||||||
cursor = menu_top;
|
cursor = menu_top;
|
||||||
#ifdef HAVE_LCD_BITMAP
|
|
||||||
lcd_setmargins(0,0);
|
|
||||||
lcd_setfont(0);
|
|
||||||
#endif
|
|
||||||
lcd_clear_display();
|
|
||||||
lcd_update();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void menu_draw(void)
|
void menu_draw(void)
|
||||||
{
|
{
|
||||||
int i = 0;
|
int i = 0;
|
||||||
|
|
||||||
|
lcd_clear_display();
|
||||||
|
#ifdef HAVE_LCD_BITMAP
|
||||||
|
lcd_setmargins(0,0);
|
||||||
|
lcd_setfont(0);
|
||||||
|
#endif
|
||||||
for (i = 0; i < itemcount; i++) {
|
for (i = 0; i < itemcount; i++) {
|
||||||
lcd_puts(1, i, items[i].desc);
|
lcd_puts(1, i, items[i].desc);
|
||||||
if (i < menu_top)
|
if (i < menu_top)
|
||||||
|
@ -119,7 +118,6 @@ void menu_run(void)
|
||||||
int key;
|
int key;
|
||||||
|
|
||||||
menu_draw();
|
menu_draw();
|
||||||
put_cursor_menu_top();
|
|
||||||
|
|
||||||
while(1) {
|
while(1) {
|
||||||
key = button_get();
|
key = button_get();
|
||||||
|
@ -167,7 +165,6 @@ void menu_run(void)
|
||||||
execute_menu_item();
|
execute_menu_item();
|
||||||
|
|
||||||
/* Return to previous display state */
|
/* Return to previous display state */
|
||||||
lcd_clear_display();
|
|
||||||
menu_draw();
|
menu_draw();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue