summaryrefslogtreecommitdiff
path: root/apps
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
parent0432147f2f2f6a505404ae26f85c0ca22a782bca (diff)
downloadrockbox-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')
-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)
848 int len = 0, fn_idx = 0; 848 int len = 0, fn_idx = 0;
849 849
850 avail -= sizeof(struct track_data); 850 avail -= sizeof(struct track_data);
851 track_num = rb->tagcache_get_numeric(&tcs, tag_tracknumber) - 1; 851 track_num = rb->tagcache_get_numeric(&tcs, tag_tracknumber);
852 disc_num = rb->tagcache_get_numeric(&tcs, tag_discnumber); 852 disc_num = rb->tagcache_get_numeric(&tcs, tag_discnumber);
853 853
854 if (disc_num < 0) 854 if (disc_num < 0)
855 disc_num = 0; 855 disc_num = 0;
856retry: 856retry:
857 if (track_num >= 0) 857 if (track_num > 0)
858 { 858 {
859 if (disc_num) 859 if (disc_num)
860 fn_idx = 1 + rb->snprintf(track_names + string_index , avail, 860 fn_idx = 1 + rb->snprintf(track_names + string_index , avail,
861 "%d.%02d: %s", disc_num, track_num + 1, tcs.result); 861 "%d.%02d: %s", disc_num, track_num, tcs.result);
862 else 862 else
863 fn_idx = 1 + rb->snprintf(track_names + string_index , avail, 863 fn_idx = 1 + rb->snprintf(track_names + string_index , avail,
864 "%d: %s", track_num + 1, tcs.result); 864 "%d: %s", track_num, tcs.result);
865 } 865 }
866 else 866 else
867 { 867 {
@@ -910,7 +910,7 @@ retry:
910 910
911 avail -= len; 911 avail -= len;
912 tracks--; 912 tracks--;
913 tracks->sort = ((disc_num - 1) << 24) + (track_num << 14) + track_count; 913 tracks->sort = (disc_num << 24) + (track_num << 14) + track_count;
914 tracks->name_idx = string_index; 914 tracks->name_idx = string_index;
915 tracks->seek = tcs.result_seek; 915 tracks->seek = tcs.result_seek;
916#if PF_PLAYBACK_CAPABLE 916#if PF_PLAYBACK_CAPABLE