summaryrefslogtreecommitdiff
path: root/apps/menus/sound_menu.c
diff options
context:
space:
mode:
authorWilliam Wilgus <wilgus.william@gmail.com>2020-07-19 13:42:04 -0400
committerWilliam Wilgus <me.theuser@yahoo.com>2020-07-19 22:10:26 +0000
commitc39f95465b9844f70f375f1690e0bf75c7ee7cc1 (patch)
tree2fda6bd805a74f41dd4303c7699eabb9e1aa4a1c /apps/menus/sound_menu.c
parent4663d94b4e4edec609b6a24581ee345f2a1bedaa (diff)
downloadrockbox-c39f95465b9844f70f375f1690e0bf75c7ee7cc1.tar.gz
rockbox-c39f95465b9844f70f375f1690e0bf75c7ee7cc1.zip
do_menu pass internal synclist reference to callback
keep running into the rigid nature of do_menu it isn't too bad when you don't need voice but once you do the fun awaits do_menu likes to talk on menu enter which is in a loop when you use do_menu I would like to move the processing to the callback TOO BAD you only get an action and the menu_item_ex struct you sent it when calling the function Change-Id: Iaefd0cc133435d675b7dd27a558c504d6ccb327a
Diffstat (limited to 'apps/menus/sound_menu.c')
-rw-r--r--apps/menus/sound_menu.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/apps/menus/sound_menu.c b/apps/menus/sound_menu.c
index fb9a7fa26e..f39d980a35 100644
--- a/apps/menus/sound_menu.c
+++ b/apps/menus/sound_menu.c
@@ -38,9 +38,12 @@
38#include "option_select.h" 38#include "option_select.h"
39#include "misc.h" 39#include "misc.h"
40 40
41static int volume_limit_callback(int action,const struct menu_item_ex *this_item) 41static int volume_limit_callback(int action,
42 const struct menu_item_ex *this_item,
43 struct gui_synclist *this_list)
42{ 44{
43 (void)this_item; 45 (void)this_item;
46 (void)this_list;
44 47
45 static struct int_setting volume_limit_int_setting; 48 static struct int_setting volume_limit_int_setting;
46 volume_limit_int_setting.option_callback = NULL; 49 volume_limit_int_setting.option_callback = NULL;
@@ -147,8 +150,11 @@ MENUITEM_SETTING(func_mode, &global_settings.func_mode, NULL);
147 &crossfeed_hf_attenuation, &crossfeed_hf_cutoff); 150 &crossfeed_hf_attenuation, &crossfeed_hf_cutoff);
148 151
149#ifdef HAVE_PITCHCONTROL 152#ifdef HAVE_PITCHCONTROL
150static int timestretch_callback(int action,const struct menu_item_ex *this_item) 153static int timestretch_callback(int action,
154 const struct menu_item_ex *this_item,
155 struct gui_synclist *this_list)
151{ 156{
157 (void)this_list;
152 switch (action) 158 switch (action)
153 { 159 {
154 case ACTION_EXIT_MENUITEM: /* on exit */ 160 case ACTION_EXIT_MENUITEM: /* on exit */
@@ -156,7 +162,7 @@ static int timestretch_callback(int action,const struct menu_item_ex *this_item)
156 splash(HZ*2, ID2P(LANG_PLEASE_REBOOT)); 162 splash(HZ*2, ID2P(LANG_PLEASE_REBOOT));
157 break; 163 break;
158 } 164 }
159 lowlatency_callback(action, this_item); 165 lowlatency_callback(action, this_item, NULL);
160 return action; 166 return action;
161} 167}
162 MENUITEM_SETTING(timestretch_enabled, 168 MENUITEM_SETTING(timestretch_enabled,