From 7eb7c23a0fe43e066ba27a80d2a2e34c0cdef6c7 Mon Sep 17 00:00:00 2001 From: Jonathan Gordon Date: Tue, 26 Dec 2006 12:35:14 +0000 Subject: 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 --- apps/sound_menu.c | 31 ++++++++++++++++++++++--------- 1 file 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 -- cgit v1.2.3