diff options
author | William Wilgus <wilgus.william@gmail.com> | 2022-12-17 02:43:41 -0500 |
---|---|---|
committer | William Wilgus <wilgus.william@gmail.com> | 2022-12-17 02:51:43 -0500 |
commit | ccf1aaa5bede11c95d219adbf6267426b57613d2 (patch) | |
tree | a2670a79c42b743d19631055385004706369b5d2 /apps/menu.c | |
parent | 6f54bb63fc1f0da06330806321fbba50b1364907 (diff) | |
download | rockbox-ccf1aaa5bede11c95d219adbf6267426b57613d2.tar.gz rockbox-ccf1aaa5bede11c95d219adbf6267426b57613d2.zip |
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
Diffstat (limited to 'apps/menu.c')
-rw-r--r-- | apps/menu.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/apps/menu.c b/apps/menu.c index 48eea70454..2ef8e0d839 100644 --- a/apps/menu.c +++ b/apps/menu.c | |||
@@ -644,14 +644,19 @@ int do_menu(const struct menu_item_ex *start_menu, int *start_selected, | |||
644 | init_menu_lists(menu, &lists, 0, true, vps); | 644 | init_menu_lists(menu, &lists, 0, true, vps); |
645 | } | 645 | } |
646 | break; | 646 | break; |
647 | case MT_FUNCTION_CALL_W_PARAM: | ||
647 | case MT_FUNCTION_CALL: | 648 | case MT_FUNCTION_CALL: |
648 | { | 649 | { |
649 | int return_value; | 650 | int return_value; |
650 | if (temp->flags&MENU_FUNC_USEPARAM) | 651 | if (type == MT_FUNCTION_CALL_W_PARAM) |
651 | return_value = temp->function->function_w_param( | 652 | { |
652 | temp->function->param); | 653 | return_value = temp->function_param->function_w_param( |
654 | temp->function_param->param); | ||
655 | } | ||
653 | else | 656 | else |
657 | { | ||
654 | return_value = temp->function->function(); | 658 | return_value = temp->function->function(); |
659 | } | ||
655 | if (!(menu->flags&MENU_EXITAFTERTHISMENU) || | 660 | if (!(menu->flags&MENU_EXITAFTERTHISMENU) || |
656 | (temp->flags&MENU_EXITAFTERTHISMENU)) | 661 | (temp->flags&MENU_EXITAFTERTHISMENU)) |
657 | { | 662 | { |