From 49984facc138bc705fa0ee8d6322ef006ad40f62 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Fri, 23 Aug 2002 12:57:00 +0000 Subject: properly remember DISK_CHANGE status and return that to menu parents, also when coming back from the USB screen set back the status bar state before redrawing the menu. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@1953 a1c6a512-1295-4272-9138-f99709370657 --- apps/menu.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'apps') diff --git a/apps/menu.c b/apps/menu.c index 4b871bb293..67a1620a12 100644 --- a/apps/menu.c +++ b/apps/menu.c @@ -260,7 +260,12 @@ Menu menu_run(int m) are gonna clear the screen anyway */ lcd_clear_display(); - menus[m].items[menus[m].cursor].function(); + /* if a child returns that the contents is changed, we + must remember this, even if we perhaps invoke other + children too before returning back */ + if(MENU_DISK_CHANGED == + menus[m].items[menus[m].cursor].function()) + result = MENU_DISK_CHANGED; /* Return to previous display state */ menu_draw(m); @@ -293,12 +298,12 @@ Menu menu_run(int m) #endif usb_acknowledge(SYS_USB_CONNECTED_ACK); usb_wait_for_disconnect(&button_queue); - menu_draw(m); #ifdef HAVE_LCD_BITMAP statusbar(laststate); #else lcd_icon(ICON_PARAM, true); #endif + menu_draw(m); result = MENU_DISK_CHANGED; break; #endif -- cgit v1.2.3