diff options
author | Teruaki Kawashima <teru@rockbox.org> | 2010-10-13 12:13:59 +0000 |
---|---|---|
committer | Teruaki Kawashima <teru@rockbox.org> | 2010-10-13 12:13:59 +0000 |
commit | 58322542899a4f5de348566e1a65e514b8e5ff66 (patch) | |
tree | 6090b00bda9f4b298d9c9544073b09811cb96066 /apps/plugins | |
parent | 0432147f2f2f6a505404ae26f85c0ca22a782bca (diff) | |
download | rockbox-58322542899a4f5de348566e1a65e514b8e5ff66.tar.gz rockbox-58322542899a4f5de348566e1a65e514b8e5ff66.zip |
fix sorting of track list when tracks with track number and tracks without track number are in the same list.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28267 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/plugins')
-rw-r--r-- | apps/plugins/pictureflow/pictureflow.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/apps/plugins/pictureflow/pictureflow.c b/apps/plugins/pictureflow/pictureflow.c index db4621eb24..9fb2bd4a76 100644 --- a/apps/plugins/pictureflow/pictureflow.c +++ b/apps/plugins/pictureflow/pictureflow.c @@ -848,20 +848,20 @@ void create_track_index(const int slide_index) int len = 0, fn_idx = 0; avail -= sizeof(struct track_data); - track_num = rb->tagcache_get_numeric(&tcs, tag_tracknumber) - 1; + track_num = rb->tagcache_get_numeric(&tcs, tag_tracknumber); disc_num = rb->tagcache_get_numeric(&tcs, tag_discnumber); if (disc_num < 0) disc_num = 0; retry: - if (track_num >= 0) + if (track_num > 0) { if (disc_num) fn_idx = 1 + rb->snprintf(track_names + string_index , avail, - "%d.%02d: %s", disc_num, track_num + 1, tcs.result); + "%d.%02d: %s", disc_num, track_num, tcs.result); else fn_idx = 1 + rb->snprintf(track_names + string_index , avail, - "%d: %s", track_num + 1, tcs.result); + "%d: %s", track_num, tcs.result); } else { @@ -910,7 +910,7 @@ retry: avail -= len; tracks--; - tracks->sort = ((disc_num - 1) << 24) + (track_num << 14) + track_count; + tracks->sort = (disc_num << 24) + (track_num << 14) + track_count; tracks->name_idx = string_index; tracks->seek = tcs.result_seek; #if PF_PLAYBACK_CAPABLE |