summaryrefslogtreecommitdiffstats
path: root/apps/sound_menu.c
diff options
context:
space:
mode:
authorJonathan Gordon <rockbox@jdgordon.info>2006-12-26 12:35:14 +0000
committerJonathan Gordon <rockbox@jdgordon.info>2006-12-26 12:35:14 +0000
commit7eb7c23a0fe43e066ba27a80d2a2e34c0cdef6c7 (patch)
treea6ccc80690ebdad8003474caaac3d697592a76ec /apps/sound_menu.c
parentda7d05d5adde2e1ed6553cd814bb16a8d15f5c6c (diff)
downloadrockbox-7eb7c23a0fe43e066ba27a80d2a2e34c0cdef6c7.tar.gz
rockbox-7eb7c23a0fe43e066ba27a80d2a2e34c0cdef6c7.zip
Fix FS#6270, no voice is sonud menu. This only fixes the no voice in the
actual menu. The setting screen will still have no voice if playback is enable, but at least you know which item you are entering. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@11839 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/sound_menu.c')
-rw-r--r--apps/sound_menu.c31
1 files changed, 22 insertions, 9 deletions
diff --git a/apps/sound_menu.c b/apps/sound_menu.c
index e0716a5e86..6e4523cb89 100644
--- a/apps/sound_menu.c
+++ b/apps/sound_menu.c
@@ -763,7 +763,8 @@ static bool stereo_width(void)
bool sound_menu(void)
{
int m;
- bool result;
+ bool done = false;
+ int selected;
static const struct menu_item items[] = {
{ ID2P(LANG_VOLUME), volume },
#ifndef HAVE_TLV320
@@ -792,21 +793,33 @@ bool sound_menu(void)
{ ID2P(LANG_MDB_SHAPE), mdb_shape },
#endif
};
-
-#if CONFIG_CODEC == SWCODEC
- pcmbuf_set_low_latency(true);
-#endif
m=menu_init( items, sizeof(items) / sizeof(*items), NULL,
NULL, NULL, NULL);
- result = menu_run(m);
- menu_exit(m);
+ while (!done)
+ {
+ switch (selected=menu_show(m))
+ {
+ case MENU_SELECTED_EXIT:
+ case MENU_ATTACHED_USB:
+ done = true;
+ break;
+ default:
+#if CONFIG_CODEC == SWCODEC
+ pcmbuf_set_low_latency(true);
+#endif
+ if (items[selected].function)
+ items[selected].function();
#if CONFIG_CODEC == SWCODEC
- pcmbuf_set_low_latency(false);
+ pcmbuf_set_low_latency(false);
#endif
+ gui_syncstatusbar_draw(&statusbars, true);
+ }
+ }
+ menu_exit(m);
- return result;
+ return selected==MENU_ATTACHED_USB?true:false;
}
#ifdef HAVE_RECORDING