diff --git a/apps/menus/eq_menu.c b/apps/menus/eq_menu.c index 8473b6b233..e7e313e7b2 100644 --- a/apps/menus/eq_menu.c +++ b/apps/menus/eq_menu.c @@ -80,48 +80,48 @@ void eq_precut_format(char* buffer, int buffer_size, int value, const char* unit */ int enable_callback(int action, const struct menu_item_ex *this_item) { - int i; - (void)this_item; - if (action == ACTION_EXIT_MENUITEM) - { - dsp_set_eq(global_settings.eq_enabled); - dsp_set_eq_precut(global_settings.eq_precut); - /* Update all bands */ - for(i = 0; i < 5; i++) { - dsp_set_eq_coefs(i); - } - } - return action; + int i; + (void)this_item; + if (action == ACTION_EXIT_MENUITEM) + { + dsp_set_eq(global_settings.eq_enabled); + dsp_set_eq_precut(global_settings.eq_precut); + /* Update all bands */ + for(i = 0; i < 5; i++) { + dsp_set_eq_coefs(i); + } + } + return action; } MENUITEM_SETTING(eq_enable, &global_settings.eq_enabled, enable_callback); MENUITEM_SETTING(eq_precut, &global_settings.eq_precut, NULL); int dsp_set_coefs_callback(int action, const struct menu_item_ex *this_item) { - (void)this_item; - if (action == ACTION_EXIT_MENUITEM) - { - /* for now, set every band... figure out a better way later */ - int i=0; - for (i=0; i<5; i++) - dsp_set_eq_coefs(i); - } - return action; + (void)this_item; + if (action == ACTION_EXIT_MENUITEM) + { + /* for now, set every band... figure out a better way later */ + int i=0; + for (i=0; i<5; i++) + dsp_set_eq_coefs(i); + } + return action; } char* gainitem_get_name(int selected_item, void * data, char *buffer) { - (void)selected_item; - int *setting = (int*)data; - snprintf(buffer, MAX_PATH, str(LANG_EQUALIZER_GAIN_ITEM), *setting); - return buffer; + (void)selected_item; + int *setting = (int*)data; + snprintf(buffer, MAX_PATH, str(LANG_EQUALIZER_GAIN_ITEM), *setting); + return buffer; } int do_option(void* param) { - const struct menu_item_ex *setting = (const struct menu_item_ex*)param; - do_setting_from_menu(setting); - return 0; + const struct menu_item_ex *setting = (const struct menu_item_ex*)param; + do_setting_from_menu(setting); + return 0; } MENUITEM_SETTING(cutoff_0, &global_settings.eq_band0_cutoff, dsp_set_coefs_callback); @@ -143,66 +143,66 @@ MENUITEM_SETTING(gain_3, &global_settings.eq_band3_gain, dsp_set_coefs_callback) MENUITEM_SETTING(gain_4, &global_settings.eq_band4_gain, dsp_set_coefs_callback); MENUITEM_FUNCTION_WPARAM_DYNTEXT(gain_item_0, do_option, (void*)&gain_0, NULL, - gainitem_get_name, - &global_settings.eq_band0_cutoff, NOICON); + gainitem_get_name, + &global_settings.eq_band0_cutoff, NOICON); MENUITEM_FUNCTION_WPARAM_DYNTEXT(gain_item_1, do_option, (void*)&gain_1, NULL, - gainitem_get_name, - &global_settings.eq_band1_cutoff, NOICON); + gainitem_get_name, + &global_settings.eq_band1_cutoff, NOICON); MENUITEM_FUNCTION_WPARAM_DYNTEXT(gain_item_2, do_option, (void*)&gain_2, NULL, - gainitem_get_name, - &global_settings.eq_band2_cutoff, NOICON); + gainitem_get_name, + &global_settings.eq_band2_cutoff, NOICON); MENUITEM_FUNCTION_WPARAM_DYNTEXT(gain_item_3, do_option, (void*)&gain_3, NULL, - gainitem_get_name, - &global_settings.eq_band3_cutoff, NOICON); + gainitem_get_name, + &global_settings.eq_band3_cutoff, NOICON); MENUITEM_FUNCTION_WPARAM_DYNTEXT(gain_item_4, do_option, (void*)&gain_4, NULL, - gainitem_get_name, - &global_settings.eq_band4_cutoff, NOICON); - + gainitem_get_name, + &global_settings.eq_band4_cutoff, NOICON); + MAKE_MENU(gain_menu, ID2P(LANG_EQUALIZER_GAIN), NULL, NOICON, &gain_item_0, - &gain_item_1, &gain_item_2, &gain_item_3, &gain_item_4); + &gain_item_1, &gain_item_2, &gain_item_3, &gain_item_4); static const struct menu_item_ex *band_items[3][3] = { - { &cutoff_1, &q_1, &gain_1 }, - { &cutoff_2, &q_2, &gain_2 }, - { &cutoff_3, &q_3, &gain_3 } + { &cutoff_1, &q_1, &gain_1 }, + { &cutoff_2, &q_2, &gain_2 }, + { &cutoff_3, &q_3, &gain_3 } }; char* centerband_get_name(int selected_item, void * data, char *buffer) { - (void)selected_item; - int band = (int)data; - snprintf(buffer, MAX_PATH, str(LANG_EQUALIZER_BAND_PEAK), band); - return buffer; + (void)selected_item; + int band = (int)data; + snprintf(buffer, MAX_PATH, str(LANG_EQUALIZER_BAND_PEAK), band); + return buffer; } int do_center_band_menu(void* param) { - int band = (int)param; - struct menu_item_ex menu; - struct menu_callback_with_desc cb_and_desc; - char desc[MAX_PATH]; - - cb_and_desc.menu_callback = NULL; - snprintf(desc, MAX_PATH, str(LANG_EQUALIZER_BAND_PEAK), band); - cb_and_desc.desc = desc; - cb_and_desc.icon = bitmap_icons_6x8[Icon_EQ]; - menu.flags = MT_MENU|(3<