From faec49f9a801f4d50fab69826ff81d3eb34404b8 Mon Sep 17 00:00:00 2001 From: Björn Stenberg Date: Wed, 12 Feb 2003 10:01:00 +0000 Subject: Exit WPS after recording git-svn-id: svn://svn.rockbox.org/rockbox/trunk@3238 a1c6a512-1295-4272-9138-f99709370657 --- apps/wps.c | 40 ++++++++++++++++++++++++++-------------- 1 file changed, 26 insertions(+), 14 deletions(-) (limited to 'apps/wps.c') diff --git a/apps/wps.c b/apps/wps.c index afcf79bac8..de5ab0a8c1 100644 --- a/apps/wps.c +++ b/apps/wps.c @@ -671,6 +671,7 @@ int wps_show(void) int button = 0, lastbutton = 0; bool ignore_keyup = true; bool restore = false; + bool exit = false; id3 = NULL; current_track_path[0] = '\0'; @@ -888,6 +889,11 @@ int wps_show(void) #endif if (menu()) return SYS_USB_CONNECTED; + + /* if user recorded, playback is stopped and we should exit */ + if (!mpeg_status()) + exit = true; + restore = true; break; @@ -915,21 +921,9 @@ int wps_show(void) if ( lastbutton != BUTTON_STOP ) break; #endif -#ifdef HAVE_LCD_CHARCELLS - status_set_record(false); - status_set_audio(false); -#endif - lcd_stop_scroll(); - - /* set dir browser to current playing song */ - if (global_settings.browse_current && - current_track_path[0] != '\0') - set_current_file(current_track_path); + exit = true; + break; - mpeg_stop(); - status_set_playmode(STATUS_STOP); - return 0; - case SYS_USB_CONNECTED: status_set_playmode(STATUS_STOP); usb_screen(); @@ -948,6 +942,24 @@ int wps_show(void) break; } + if (exit) { +#ifdef HAVE_LCD_CHARCELLS + status_set_record(false); + status_set_audio(false); +#endif + lcd_stop_scroll(); + mpeg_stop(); + status_set_playmode(STATUS_STOP); + + /* set dir browser to current playing song */ + if (global_settings.browse_current && + current_track_path[0] != '\0') + set_current_file(current_track_path); + + return 0; + } + + if ( button ) ata_spin(); -- cgit v1.2.3