summaryrefslogtreecommitdiff
path: root/apps/menu.c
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2002-08-23 12:32:52 +0000
committerDaniel Stenberg <daniel@haxx.se>2002-08-23 12:32:52 +0000
commitb285076925fed906d95573b64115cb3f6bdafe65 (patch)
tree6d959f585fc210acf39e667991038d21aef48d13 /apps/menu.c
parentad4a92eb87eb98ff316f54f06650f1c5e1dcd7ca (diff)
downloadrockbox-b285076925fed906d95573b64115cb3f6bdafe65.zip
rockbox-b285076925fed906d95573b64115cb3f6bdafe65.tar.gz
rockbox-b285076925fed906d95573b64115cb3f6bdafe65.tar.bz2
rockbox-b285076925fed906d95573b64115cb3f6bdafe65.tar.xz
Remade the menu system slightly. All functions invoked from menus now use
the Menu typedef as return type, and *ALL* menus that intercept USB connect can then return MENU_REFRESH_DIR so that the parent (any parent really) that do file or dir-accesses knows that and can do the refresh. If no refresh is needed by the parent, MENU_OK is returned. Somewhat biggish commit this close to 1.3, but we need to sort out this refresh-after-usb-connected business. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@1948 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/menu.c')
-rw-r--r--apps/menu.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/apps/menu.c b/apps/menu.c
index 418ccf3..b0060f4 100644
--- a/apps/menu.c
+++ b/apps/menu.c
@@ -212,13 +212,14 @@ void menu_exit(int m)
inuse[m] = false;
}
-void menu_run(int m)
+Menu menu_run(int m)
{
#ifndef SIMULATOR
#ifdef HAVE_LCD_BITMAP
bool laststate;
#endif
#endif
+ Menu result = MENU_OK;
menu_draw(m);
@@ -273,7 +274,7 @@ void menu_run(int m)
case BUTTON_MENU:
#endif
lcd_stop_scroll();
- return;
+ return result;
#ifdef HAVE_RECORDER_KEYPAD
case BUTTON_F3:
@@ -298,6 +299,7 @@ void menu_run(int m)
#else
lcd_icon(ICON_PARAM, true);
#endif
+ result = MENU_REFRESH_DIR;
break;
#endif
@@ -308,4 +310,6 @@ void menu_run(int m)
status_draw();
lcd_update();
}
+
+ return result;
}