From a5cc9c93cfcaa7385ee76498cf548b73d265d583 Mon Sep 17 00:00:00 2001 From: Mats Lidell Date: Fri, 16 Aug 2002 05:16:51 +0000 Subject: [PATCH] menu+left/right was broken for volume change. Patch submitted by Magnus Holmgren. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@1772 a1c6a512-1295-4272-9138-f99709370657 --- apps/wps.c | 91 ++++++++++++++++++++++++++++++++++-------------------- 1 file changed, 57 insertions(+), 34 deletions(-) diff --git a/apps/wps.c b/apps/wps.c index 72c4b5c993..240bc96f07 100644 --- a/apps/wps.c +++ b/apps/wps.c @@ -569,52 +569,73 @@ int wps_show(void) break; case BUTTON_LEFT | BUTTON_REL: - if (ff_rewind) + if (!keys_locked) { - /* rewind */ - mpeg_ff_rewind(ff_rewind_count); - ff_rewind_count = 0; - ff_rewind = false; - status_set_playmode(STATUS_PLAY); -#ifdef HAVE_LCD_CHARCELLS - draw_screen(id3); -#endif - } - else - { - if (keys_locked) + if (ff_rewind) { - display_keylock_text(keys_locked); + /* rewind */ + mpeg_ff_rewind(ff_rewind_count); + ff_rewind_count = 0; + ff_rewind = false; + status_set_playmode(STATUS_PLAY); +#ifdef HAVE_LCD_CHARCELLS draw_screen(id3); - break; +#endif } - mpeg_prev(); - status_set_playmode(STATUS_PLAY); +#ifdef HAVE_PLAYER_KEYPAD + else if(!menu_button_is_down) +#else + else +#endif + { + mpeg_prev(); + status_set_playmode(STATUS_PLAY); + } + } +#ifdef HAVE_PLAYER_KEYPAD + else if(!menu_button_is_down) +#else + else +#endif + { + display_keylock_text(keys_locked); + draw_screen(id3); } break; case BUTTON_RIGHT | BUTTON_REL: - if (ff_rewind) + if (!keys_locked) { - /* fast forward */ - mpeg_ff_rewind(ff_rewind_count); - ff_rewind_count = 0; - ff_rewind = false; - status_set_playmode(STATUS_PLAY); -#ifdef HAVE_LCD_CHARCELLS - draw_screen(id3); -#endif - } - else - { - if (keys_locked) + if (ff_rewind) { - display_keylock_text(keys_locked); + /* fast forward */ + mpeg_ff_rewind(ff_rewind_count); + ff_rewind_count = 0; + ff_rewind = false; + status_set_playmode(STATUS_PLAY); +#ifdef HAVE_LCD_CHARCELLS draw_screen(id3); - break; +#endif } - mpeg_next(); - status_set_playmode(STATUS_PLAY); +#ifdef HAVE_PLAYER_KEYPAD + else if(!menu_button_is_down) +#else + else +#endif + { + mpeg_next(); + status_set_playmode(STATUS_PLAY); + } + } +#ifdef HAVE_PLAYER_KEYPAD + else if(!menu_button_is_down) +#else + else +#endif + { + display_keylock_text(keys_locked); + draw_screen(id3); + break; } break; @@ -626,6 +647,7 @@ int wps_show(void) if(global_settings.volume < mpeg_sound_min(SOUND_VOLUME)) global_settings.volume = mpeg_sound_min(SOUND_VOLUME); mpeg_sound_set(SOUND_VOLUME, global_settings.volume); + status_draw(); settings_save(); break; @@ -636,6 +658,7 @@ int wps_show(void) if(global_settings.volume > mpeg_sound_max(SOUND_VOLUME)) global_settings.volume = mpeg_sound_max(SOUND_VOLUME); mpeg_sound_set(SOUND_VOLUME, global_settings.volume); + status_draw(); settings_save(); break;