diff options
author | Linus Nielsen Feltzing <linus@haxx.se> | 2006-01-17 12:30:03 +0000 |
---|---|---|
committer | Linus Nielsen Feltzing <linus@haxx.se> | 2006-01-17 12:30:03 +0000 |
commit | 0b8149fefbb8cbabfdd8fc7ca111fba72b4075e0 (patch) | |
tree | 7b85358cd987fc8735ccb39621e5cde2557e487b | |
parent | d47bb3c05ebf10590ccb6af96141d226ba298b79 (diff) |
Fixed a crash when wrapping the playlist viewer backwards, and made it always select the currently playing track when viewing the current playlist
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@8358 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r-- | apps/playlist_viewer.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/apps/playlist_viewer.c b/apps/playlist_viewer.c index c249142bda..9ce471877e 100644 --- a/apps/playlist_viewer.c +++ b/apps/playlist_viewer.c @@ -184,7 +184,7 @@ void playlist_buffer_load_entries_screen(struct playlist_buffer * pb, { int min_start=viewer.selected_track-2*screens[0].nb_lines; if(min_start<0) - min_start=0; + min_start=MAX_PLAYLIST_ENTRIES+min_start; playlist_buffer_load_entries(pb, min_start, FORWARD); } else @@ -334,10 +334,10 @@ static bool playlist_viewer_init(struct playlist_viewer * viewer, if (!reload) { - if (global_settings.browse_current && !viewer->playlist) - viewer->selected_track = playlist_get_display_index() - 1; - else + if (viewer->playlist) viewer->selected_track = 0; + else + viewer->selected_track = playlist_get_display_index() - 1; } if (!update_playlist(true)) |