summaryrefslogtreecommitdiff
path: root/apps
diff options
context:
space:
mode:
authorRobert Hak <adiamas@rockbox.org>2002-05-30 08:06:42 +0000
committerRobert Hak <adiamas@rockbox.org>2002-05-30 08:06:42 +0000
commitc501ac7be23652f7a06c9d9211cb6ebeef4c377a (patch)
treea8c27e8f4c830223fc3dc280c7c1061eee2d87f6 /apps
parent00c6f5136f876cdf71118621e5514db59f1143d7 (diff)
downloadrockbox-c501ac7be23652f7a06c9d9211cb6ebeef4c377a.zip
rockbox-c501ac7be23652f7a06c9d9211cb6ebeef4c377a.tar.gz
rockbox-c501ac7be23652f7a06c9d9211cb6ebeef4c377a.tar.bz2
rockbox-c501ac7be23652f7a06c9d9211cb6ebeef4c377a.tar.xz
corrected the curson not being drawn for the recorder
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@814 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps')
-rw-r--r--apps/main_menu.c4
-rw-r--r--apps/menu.c21
2 files changed, 18 insertions, 7 deletions
diff --git a/apps/main_menu.c b/apps/main_menu.c
index df9350a..e53832a 100644
--- a/apps/main_menu.c
+++ b/apps/main_menu.c
@@ -76,9 +76,9 @@ static int show_logo(void)
void show_splash(void)
{
lcd_clear_display();
-
+
if (show_logo() != 0)
- return;
+ return;
}
void version(void)
diff --git a/apps/menu.c b/apps/menu.c
index e359f75..a863925 100644
--- a/apps/menu.c
+++ b/apps/menu.c
@@ -55,6 +55,10 @@ static void menu_draw(int m)
i++) {
lcd_puts(1, i-menus[m].top, menus[m].items[i].desc);
}
+
+ /* place the cursor */
+ lcd_puts(0, menus[m].cursor - menus[m].top, "-");
+
lcd_update();
}
@@ -64,18 +68,27 @@ static void menu_draw(int m)
*/
static void put_cursor(int m, int target)
{
- lcd_puts(0, menus[m].cursor - menus[m].top, " ");
+ bool do_update = true;
+
+ lcd_puts(0, menus[m].cursor - menus[m].top, " ");
+ menus[m].cursor = target;
if ( target < menus[m].top ) {
menus[m].top--;
menu_draw(m);
+ do_update = false;
}
else if ( target-menus[m].top > MENU_LINES-1 ) {
menus[m].top++;
menu_draw(m);
+ do_update = false;
}
- menus[m].cursor = target;
- lcd_puts(0, menus[m].cursor - menus[m].top, "-");
+
+ if (do_update) {
+ lcd_puts(0, menus[m].cursor - menus[m].top, "-");
+ lcd_update();
+ }
+
}
int menu_init(struct menu_items* mitems, int count)
@@ -108,7 +121,6 @@ void menu_exit(int m)
void menu_run(int m)
{
menu_draw(m);
- lcd_puts(0, menus[m].cursor - menus[m].top, "-");
while(1) {
switch( button_get(true) ) {
@@ -145,7 +157,6 @@ void menu_run(int m)
/* Return to previous display state */
menu_draw(m);
- lcd_puts(0, menus[m].cursor - menus[m].top, "-");
break;
#ifdef HAVE_RECORDER_KEYPAD