diff options
author | Linus Nielsen Feltzing <linus@haxx.se> | 2003-07-08 09:19:12 +0000 |
---|---|---|
committer | Linus Nielsen Feltzing <linus@haxx.se> | 2003-07-08 09:19:12 +0000 |
commit | 6e49e78c9bdda5655b0cef0d895ee801bbc6ed5e (patch) | |
tree | 68b25217195a77ee75fabcb4a3ee3834d77256cb /apps | |
parent | adef8fb17e3990f9ee3d4d63374513108ec1a534 (diff) | |
download | rockbox-6e49e78c9bdda5655b0cef0d895ee801bbc6ed5e.tar.gz rockbox-6e49e78c9bdda5655b0cef0d895ee801bbc6ed5e.zip |
Henrik Backe's resume-with-ON-key patch (#767082). Now you can resume playback after STOP is pressed by just hitting the ON key to go to the WPS.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@3816 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps')
-rw-r--r-- | apps/tree.c | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/apps/tree.c b/apps/tree.c index 29ca4dfe15..d009f4eb68 100644 --- a/apps/tree.c +++ b/apps/tree.c | |||
@@ -540,7 +540,7 @@ static int showdir(char *path, int start) | |||
540 | return filesindir; | 540 | return filesindir; |
541 | } | 541 | } |
542 | 542 | ||
543 | static bool ask_resume(void) | 543 | static bool ask_resume(bool ask_once) |
544 | { | 544 | { |
545 | #ifdef HAVE_LCD_CHARCELLS | 545 | #ifdef HAVE_LCD_CHARCELLS |
546 | lcd_double_height(false); | 546 | lcd_double_height(false); |
@@ -571,7 +571,7 @@ static bool ask_resume(void) | |||
571 | break; | 571 | break; |
572 | } | 572 | } |
573 | 573 | ||
574 | if ( global_settings.resume == RESUME_ASK_ONCE) { | 574 | if ( global_settings.resume == RESUME_ASK_ONCE && ask_once) { |
575 | global_settings.resume_index = -1; | 575 | global_settings.resume_index = -1; |
576 | settings_save(); | 576 | settings_save(); |
577 | } | 577 | } |
@@ -613,7 +613,7 @@ void reload_directory(void) | |||
613 | reload_dir = true; | 613 | reload_dir = true; |
614 | } | 614 | } |
615 | 615 | ||
616 | static void start_resume(void) | 616 | static void start_resume(bool ask_once) |
617 | { | 617 | { |
618 | if ( global_settings.resume && | 618 | if ( global_settings.resume && |
619 | global_settings.resume_index != -1 ) { | 619 | global_settings.resume_index != -1 ) { |
@@ -621,7 +621,7 @@ static void start_resume(void) | |||
621 | global_settings.resume_index, | 621 | global_settings.resume_index, |
622 | global_settings.resume_offset); | 622 | global_settings.resume_offset); |
623 | 623 | ||
624 | if (!ask_resume()) | 624 | if (!ask_resume(ask_once)) |
625 | return; | 625 | return; |
626 | 626 | ||
627 | if (playlist_resume() != -1) | 627 | if (playlist_resume() != -1) |
@@ -817,7 +817,7 @@ static bool dirbrowse(char *root) | |||
817 | 817 | ||
818 | memcpy(currdir,root,sizeof(currdir)); | 818 | memcpy(currdir,root,sizeof(currdir)); |
819 | 819 | ||
820 | start_resume(); | 820 | start_resume(true); |
821 | 821 | ||
822 | numentries = showdir(currdir, dirstart); | 822 | numentries = showdir(currdir, dirstart); |
823 | if (numentries == -1) | 823 | if (numentries == -1) |
@@ -1159,6 +1159,11 @@ static bool dirbrowse(char *root) | |||
1159 | #endif | 1159 | #endif |
1160 | restore = true; | 1160 | restore = true; |
1161 | } | 1161 | } |
1162 | else | ||
1163 | { | ||
1164 | start_resume(false); | ||
1165 | restore = true; | ||
1166 | } | ||
1162 | } | 1167 | } |
1163 | break; | 1168 | break; |
1164 | 1169 | ||