1
0
Fork 0
forked from len0rd/rockbox

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
This commit is contained in:
Daniel Stenberg 2002-08-23 12:32:52 +00:00
parent ad4a92eb87
commit b285076925
23 changed files with 175 additions and 89 deletions

View file

@ -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;
}