summaryrefslogtreecommitdiffstats
path: root/apps/plugins/pictureflow
diff options
context:
space:
mode:
authorTeruaki Kawashima <teru@rockbox.org>2010-10-13 12:13:59 +0000
committerTeruaki Kawashima <teru@rockbox.org>2010-10-13 12:13:59 +0000
commit58322542899a4f5de348566e1a65e514b8e5ff66 (patch)
tree6090b00bda9f4b298d9c9544073b09811cb96066 /apps/plugins/pictureflow
parent0432147f2f2f6a505404ae26f85c0ca22a782bca (diff)
downloadrockbox-58322542899a4f5de348566e1a65e514b8e5ff66.tar.gz
rockbox-58322542899a4f5de348566e1a65e514b8e5ff66.tar.bz2
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/pictureflow')
-rw-r--r--apps/plugins/pictureflow/pictureflow.c10
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