summaryrefslogtreecommitdiffstats
path: root/apps/playlist_viewer.c
diff options
context:
space:
mode:
authorDave Hooper <dave@beermex.com>2009-07-02 22:45:00 +0000
committerDave Hooper <dave@beermex.com>2009-07-02 22:45:00 +0000
commit4044499198172228dec566782dbe1707f90898a4 (patch)
tree15695396fd9c0c1d0151529f6a832d7e62d1b5fb /apps/playlist_viewer.c
parentbff790d692333fe8e43605682c4a980821e82b53 (diff)
downloadrockbox-4044499198172228dec566782dbe1707f90898a4.tar.gz
rockbox-4044499198172228dec566782dbe1707f90898a4.tar.bz2
rockbox-4044499198172228dec566782dbe1707f90898a4.zip
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
Diffstat (limited to 'apps/playlist_viewer.c')
-rw-r--r--apps/playlist_viewer.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/apps/playlist_viewer.c b/apps/playlist_viewer.c
index 961d2cdf12..5fcf9f237c 100644
--- a/apps/playlist_viewer.c
+++ b/apps/playlist_viewer.c
@@ -418,10 +418,18 @@ 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);