diff options
author | Björn Stenberg <bjorn@haxx.se> | 2003-02-12 10:01:00 +0000 |
---|---|---|
committer | Björn Stenberg <bjorn@haxx.se> | 2003-02-12 10:01:00 +0000 |
commit | faec49f9a801f4d50fab69826ff81d3eb34404b8 (patch) | |
tree | d45265dee092596f33568accaab7113ee4a772e9 | |
parent | 2542dd8412526d29303e2e22570940b14d2d118e (diff) | |
download | rockbox-faec49f9a801f4d50fab69826ff81d3eb34404b8.tar.gz rockbox-faec49f9a801f4d50fab69826ff81d3eb34404b8.zip |
Exit WPS after recording
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@3238 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r-- | apps/wps.c | 40 |
1 files changed, 26 insertions, 14 deletions
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) | |||
671 | int button = 0, lastbutton = 0; | 671 | int button = 0, lastbutton = 0; |
672 | bool ignore_keyup = true; | 672 | bool ignore_keyup = true; |
673 | bool restore = false; | 673 | bool restore = false; |
674 | bool exit = false; | ||
674 | 675 | ||
675 | id3 = NULL; | 676 | id3 = NULL; |
676 | current_track_path[0] = '\0'; | 677 | current_track_path[0] = '\0'; |
@@ -888,6 +889,11 @@ int wps_show(void) | |||
888 | #endif | 889 | #endif |
889 | if (menu()) | 890 | if (menu()) |
890 | return SYS_USB_CONNECTED; | 891 | return SYS_USB_CONNECTED; |
892 | |||
893 | /* if user recorded, playback is stopped and we should exit */ | ||
894 | if (!mpeg_status()) | ||
895 | exit = true; | ||
896 | |||
891 | restore = true; | 897 | restore = true; |
892 | break; | 898 | break; |
893 | 899 | ||
@@ -915,21 +921,9 @@ int wps_show(void) | |||
915 | if ( lastbutton != BUTTON_STOP ) | 921 | if ( lastbutton != BUTTON_STOP ) |
916 | break; | 922 | break; |
917 | #endif | 923 | #endif |
918 | #ifdef HAVE_LCD_CHARCELLS | 924 | exit = true; |
919 | status_set_record(false); | 925 | break; |
920 | status_set_audio(false); | ||
921 | #endif | ||
922 | lcd_stop_scroll(); | ||
923 | |||
924 | /* set dir browser to current playing song */ | ||
925 | if (global_settings.browse_current && | ||
926 | current_track_path[0] != '\0') | ||
927 | set_current_file(current_track_path); | ||
928 | 926 | ||
929 | mpeg_stop(); | ||
930 | status_set_playmode(STATUS_STOP); | ||
931 | return 0; | ||
932 | |||
933 | case SYS_USB_CONNECTED: | 927 | case SYS_USB_CONNECTED: |
934 | status_set_playmode(STATUS_STOP); | 928 | status_set_playmode(STATUS_STOP); |
935 | usb_screen(); | 929 | usb_screen(); |
@@ -948,6 +942,24 @@ int wps_show(void) | |||
948 | break; | 942 | break; |
949 | } | 943 | } |
950 | 944 | ||
945 | if (exit) { | ||
946 | #ifdef HAVE_LCD_CHARCELLS | ||
947 | status_set_record(false); | ||
948 | status_set_audio(false); | ||
949 | #endif | ||
950 | lcd_stop_scroll(); | ||
951 | mpeg_stop(); | ||
952 | status_set_playmode(STATUS_STOP); | ||
953 | |||
954 | /* set dir browser to current playing song */ | ||
955 | if (global_settings.browse_current && | ||
956 | current_track_path[0] != '\0') | ||
957 | set_current_file(current_track_path); | ||
958 | |||
959 | return 0; | ||
960 | } | ||
961 | |||
962 | |||
951 | if ( button ) | 963 | if ( button ) |
952 | ata_spin(); | 964 | ata_spin(); |
953 | 965 | ||