mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-10-26 23:36:37 -04:00
Add reset EQ menu option
Change-Id: Ia555359263a42545abe3f1039d7933204be02f6d
This commit is contained in:
parent
9b1a92fe36
commit
9efed5542e
2 changed files with 27 additions and 1 deletions
|
|
@ -950,6 +950,20 @@
|
||||||
*: "Equalizer"
|
*: "Equalizer"
|
||||||
</voice>
|
</voice>
|
||||||
</phrase>
|
</phrase>
|
||||||
|
<phrase>
|
||||||
|
id: LANG_RESET_EQUALIZER
|
||||||
|
desc: in the equalizer settings menu
|
||||||
|
user: core
|
||||||
|
<source>
|
||||||
|
*: "Reset EQ"
|
||||||
|
</source>
|
||||||
|
<dest>
|
||||||
|
*: "Reset EQ"
|
||||||
|
</dest>
|
||||||
|
<voice>
|
||||||
|
*: "Reset EQ"
|
||||||
|
</voice>
|
||||||
|
</phrase>
|
||||||
<phrase>
|
<phrase>
|
||||||
id: LANG_EQUALIZER_ENABLED
|
id: LANG_EQUALIZER_ENABLED
|
||||||
desc: in the equalizer settings menu
|
desc: in the equalizer settings menu
|
||||||
|
|
|
||||||
|
|
@ -782,14 +782,26 @@ static int eq_save_preset(void)
|
||||||
/* Allows browsing of preset files */
|
/* Allows browsing of preset files */
|
||||||
static struct browse_folder_info eqs = { EQS_DIR, SHOW_CFG };
|
static struct browse_folder_info eqs = { EQS_DIR, SHOW_CFG };
|
||||||
|
|
||||||
|
static void eq_reset_defaults(void)
|
||||||
|
{
|
||||||
|
for (int i = 0; i < EQ_NUM_BANDS; i++) {
|
||||||
|
global_settings.eq_band_settings[i].cutoff = eq_defaults[i].cutoff;
|
||||||
|
global_settings.eq_band_settings[i].q = eq_defaults[i].q;
|
||||||
|
global_settings.eq_band_settings[i].gain = eq_defaults[i].gain;
|
||||||
|
}
|
||||||
|
eq_apply();
|
||||||
|
}
|
||||||
|
|
||||||
MENUITEM_FUNCTION(eq_graphical, 0, ID2P(LANG_EQUALIZER_GRAPHICAL),
|
MENUITEM_FUNCTION(eq_graphical, 0, ID2P(LANG_EQUALIZER_GRAPHICAL),
|
||||||
eq_menu_graphical, lowlatency_callback, Icon_EQ);
|
eq_menu_graphical, lowlatency_callback, Icon_EQ);
|
||||||
MENUITEM_FUNCTION(eq_save, 0, ID2P(LANG_EQUALIZER_SAVE),
|
MENUITEM_FUNCTION(eq_save, 0, ID2P(LANG_EQUALIZER_SAVE),
|
||||||
eq_save_preset, NULL, Icon_NOICON);
|
eq_save_preset, NULL, Icon_NOICON);
|
||||||
|
MENUITEM_FUNCTION(eq_reset, 0, ID2P(LANG_RESET_EQUALIZER),
|
||||||
|
eq_reset_defaults, NULL, Icon_NOICON);
|
||||||
MENUITEM_FUNCTION_W_PARAM(eq_browse, 0, ID2P(LANG_EQUALIZER_BROWSE),
|
MENUITEM_FUNCTION_W_PARAM(eq_browse, 0, ID2P(LANG_EQUALIZER_BROWSE),
|
||||||
browse_folder, (void*)&eqs,
|
browse_folder, (void*)&eqs,
|
||||||
lowlatency_callback, Icon_NOICON);
|
lowlatency_callback, Icon_NOICON);
|
||||||
|
|
||||||
MAKE_MENU(equalizer_menu, ID2P(LANG_EQUALIZER), NULL, Icon_EQ,
|
MAKE_MENU(equalizer_menu, ID2P(LANG_EQUALIZER), NULL, Icon_EQ,
|
||||||
&eq_enable, &eq_graphical, &eq_precut, &gain_menu,
|
&eq_enable, &eq_graphical, &eq_precut, &gain_menu,
|
||||||
&advanced_menu, &eq_save, &eq_browse);
|
&advanced_menu, &eq_save, &eq_browse, &eq_reset);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue