summaryrefslogtreecommitdiff
path: root/apps
diff options
context:
space:
mode:
authorBjörn Stenberg <bjorn@haxx.se>2003-02-12 10:01:00 +0000
committerBjörn Stenberg <bjorn@haxx.se>2003-02-12 10:01:00 +0000
commitfaec49f9a801f4d50fab69826ff81d3eb34404b8 (patch)
treed45265dee092596f33568accaab7113ee4a772e9 /apps
parent2542dd8412526d29303e2e22570940b14d2d118e (diff)
downloadrockbox-faec49f9a801f4d50fab69826ff81d3eb34404b8.zip
rockbox-faec49f9a801f4d50fab69826ff81d3eb34404b8.tar.gz
rockbox-faec49f9a801f4d50fab69826ff81d3eb34404b8.tar.bz2
rockbox-faec49f9a801f4d50fab69826ff81d3eb34404b8.tar.xz
Exit WPS after recording
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@3238 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps')
-rw-r--r--apps/wps.c40
1 files changed, 26 insertions, 14 deletions
diff --git a/apps/wps.c b/apps/wps.c
index afcf79b..de5ab0a 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();