1
0
Fork 0
forked from len0rd/rockbox

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
This commit is contained in:
Jonathan Gordon 2008-08-11 13:57:26 +00:00
parent 22e0603d52
commit faf32a26b7

View file

@ -2062,8 +2062,9 @@ int playlist_resume(void)
char *str2 = NULL; char *str2 = NULL;
char *str3 = NULL; char *str3 = NULL;
unsigned long last_tick = current_tick; 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. */ /* So a splash while we are loading. */
if (current_tick - last_tick > HZ/4) if (current_tick - last_tick > HZ/4)
@ -2073,9 +2074,8 @@ int playlist_resume(void)
str(LANG_OFF_ABORT)); str(LANG_OFF_ABORT));
if (action_userabort(TIMEOUT_NOBLOCK)) if (action_userabort(TIMEOUT_NOBLOCK))
{ {
/* FIXME: useraborted = true;
* Not sure how to implement this, somebody more familiar break;
* with the code, please fix this. */
} }
last_tick = current_tick; last_tick = current_tick;
} }
@ -2341,6 +2341,11 @@ int playlist_resume(void)
return result; return result;
} }
if (useraborted)
{
gui_syncsplash(HZ*2, ID2P(LANG_CANCEL));
return -1;
}
if (!newline || (exit_loop && count<nread)) if (!newline || (exit_loop && count<nread))
{ {
if ((total_read + count) >= control_file_size) if ((total_read + count) >= control_file_size)