Fix playlist viewer behaviour when deleting tracks (one ret had missed being changed to ret_val). FIx playlist viewer behaviour when deleting the only remaining track in playlist (i.e. when audio stops, prevent resume playback also)

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21615 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Dave Hooper 2009-07-02 22:45:00 +00:00
parent bff790d692
commit 4044499198

View file

@ -418,11 +418,19 @@ static bool update_playlist(bool force)
/* Reload tracks */
viewer.num_tracks = nb_tracks;
if (viewer.num_tracks <= 0)
{
global_status.resume_index = -1;
global_status.resume_offset = -1;
return false;
}
playlist_buffer_load_entries_screen(&viewer.buffer, FORWARD);
if (viewer.buffer.num_loaded <= 0)
{
global_status.resume_index = -1;
global_status.resume_offset = -1;
return false;
}
}
return true;
}
@ -716,7 +724,7 @@ bool playlist_viewer_ex(const char* filename)
ret = true;
goto exit;
}
else if (ret > 0)
else if (ret_val > 0)
{
/* Playlist changed */
gui_synclist_del_item(&playlist_lists);