mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-10-13 18:17:39 -04:00
menus move functions with parameters to their own type
left the union with function(void) and function_w_param(param) as a few areas might still need to use both (onplay.c) there might be a few I missed yet.. Change-Id: I593a6875301923e19ba04ad1b0f3173dc9ebdf1f
This commit is contained in:
parent
6f54bb63fc
commit
ccf1aaa5be
13 changed files with 173 additions and 138 deletions
11
apps/menu.c
11
apps/menu.c
|
@ -644,14 +644,19 @@ int do_menu(const struct menu_item_ex *start_menu, int *start_selected,
|
|||
init_menu_lists(menu, &lists, 0, true, vps);
|
||||
}
|
||||
break;
|
||||
case MT_FUNCTION_CALL_W_PARAM:
|
||||
case MT_FUNCTION_CALL:
|
||||
{
|
||||
int return_value;
|
||||
if (temp->flags&MENU_FUNC_USEPARAM)
|
||||
return_value = temp->function->function_w_param(
|
||||
temp->function->param);
|
||||
if (type == MT_FUNCTION_CALL_W_PARAM)
|
||||
{
|
||||
return_value = temp->function_param->function_w_param(
|
||||
temp->function_param->param);
|
||||
}
|
||||
else
|
||||
{
|
||||
return_value = temp->function->function();
|
||||
}
|
||||
if (!(menu->flags&MENU_EXITAFTERTHISMENU) ||
|
||||
(temp->flags&MENU_EXITAFTERTHISMENU))
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue