diff options
| author | Jonathan Gordon <rockbox@jdgordon.info> | 2006-12-26 12:35:14 +0000 |
|---|---|---|
| committer | Jonathan Gordon <rockbox@jdgordon.info> | 2006-12-26 12:35:14 +0000 |
| commit | 7eb7c23a0fe43e066ba27a80d2a2e34c0cdef6c7 (patch) | |
| tree | a6ccc80690ebdad8003474caaac3d697592a76ec | |
| parent | da7d05d5adde2e1ed6553cd814bb16a8d15f5c6c (diff) | |
| download | rockbox-7eb7c23a0fe43e066ba27a80d2a2e34c0cdef6c7.zip rockbox-7eb7c23a0fe43e066ba27a80d2a2e34c0cdef6c7.tar.gz rockbox-7eb7c23a0fe43e066ba27a80d2a2e34c0cdef6c7.tar.bz2 rockbox-7eb7c23a0fe43e066ba27a80d2a2e34c0cdef6c7.tar.xz | |
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
| -rw-r--r-- | apps/sound_menu.c | 31 |
1 files changed, 22 insertions, 9 deletions
diff --git a/apps/sound_menu.c b/apps/sound_menu.c index e0716a5..6e4523c 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 |