From b285076925fed906d95573b64115cb3f6bdafe65 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Fri, 23 Aug 2002 12:32:52 +0000 Subject: 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 --- apps/menu.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'apps/menu.c') diff --git a/apps/menu.c b/apps/menu.c index 418ccf309d..b0060f4df4 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; } -- cgit v1.2.3