diff options
author | Jonathan Gordon <rockbox@jdgordon.info> | 2008-08-11 13:57:26 +0000 |
---|---|---|
committer | Jonathan Gordon <rockbox@jdgordon.info> | 2008-08-11 13:57:26 +0000 |
commit | faf32a26b7c3edc2d15bb643056ade46a398fae6 (patch) | |
tree | 00fcc4c7dd2b2d8732e0c56ce01d8956d78376d5 /apps | |
parent | 22e0603d52ca5bb7c009d2ff2faccfb969772af5 (diff) |
r10544 changed the playlist reloading so you couldnt actually abort the process. This fixes it...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@18242 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps')
-rw-r--r-- | apps/playlist.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/apps/playlist.c b/apps/playlist.c index 87bac57f0b..4457de853a 100644 --- a/apps/playlist.c +++ b/apps/playlist.c @@ -2062,8 +2062,9 @@ int playlist_resume(void) char *str2 = NULL; char *str3 = NULL; unsigned long last_tick = current_tick; + bool useraborted = false; - for(count=0; count<nread && !exit_loop; count++,p++) + for(count=0; count<nread && !exit_loop && !useraborted; count++,p++) { /* So a splash while we are loading. */ if (current_tick - last_tick > HZ/4) @@ -2073,9 +2074,8 @@ int playlist_resume(void) str(LANG_OFF_ABORT)); if (action_userabort(TIMEOUT_NOBLOCK)) { - /* FIXME: - * Not sure how to implement this, somebody more familiar - * with the code, please fix this. */ + useraborted = true; + break; } last_tick = current_tick; } @@ -2341,6 +2341,11 @@ int playlist_resume(void) return result; } + if (useraborted) + { + gui_syncsplash(HZ*2, ID2P(LANG_CANCEL)); + return -1; + } if (!newline || (exit_loop && count<nread)) { if ((total_read + count) >= control_file_size) |