diff options
author | William Wilgus <me.theuser@yahoo.com> | 2020-06-26 03:42:53 +0000 |
---|---|---|
committer | William Wilgus <me.theuser@yahoo.com> | 2020-06-26 03:43:26 +0000 |
commit | 7c291250ef6f34463089e45823da36a1d8297f01 (patch) | |
tree | f4185e482b17b3bac13558949620ae4d081a6478 /apps/plugins/pictureflow/pictureflow.c | |
parent | 25b1e1b8bd16132b80e0a24867291ff116ec01a7 (diff) | |
download | rockbox-7c291250ef6f34463089e45823da36a1d8297f01.tar.gz rockbox-7c291250ef6f34463089e45823da36a1d8297f01.zip |
Revert "Pictureflow Fixes: Sansa C200"
This reverts commit b7f2cc5d6d697aa40d8a568cf573ee100c32b9c4.
Change-Id: I51ec9f5fade10ce0173ed45739af6baaa5c7f746
Diffstat (limited to 'apps/plugins/pictureflow/pictureflow.c')
-rw-r--r-- | apps/plugins/pictureflow/pictureflow.c | 30 |
1 files changed, 9 insertions, 21 deletions
diff --git a/apps/plugins/pictureflow/pictureflow.c b/apps/plugins/pictureflow/pictureflow.c index 045596ce5a..3ccfc0d3a2 100644 --- a/apps/plugins/pictureflow/pictureflow.c +++ b/apps/plugins/pictureflow/pictureflow.c | |||
@@ -36,16 +36,12 @@ | |||
36 | 36 | ||
37 | 37 | ||
38 | 38 | ||
39 | |||
39 | /* Capacity 10 000 entries (for example 10k different albums) */ | 40 | /* Capacity 10 000 entries (for example 10k different albums) */ |
40 | #if PLUGIN_BUFFER_SIZE > 0x10000 | 41 | #if PLUGIN_BUFFER_SIZE > 0x10000 |
41 | #define UNIQBUF_SIZE (64*1024) | 42 | #define UNIQBUF_SIZE (64*1024) |
42 | #else | 43 | #else /*Bugfix -- Several players havent enough Ram to allow such a large buffer */ |
43 | #if PLUGIN_BUFFER_SIZE > 0x8000 | 44 | #define UNIQBUF_SIZE (16*1024) |
44 | /*Bugfix -- Several players havent enough Ram to allow such a large buffer */ | ||
45 | #define UNIQBUF_SIZE (16*1024) | ||
46 | #else | ||
47 | #define UNIQBUF_SIZE 0 | ||
48 | #endif | ||
49 | #endif | 45 | #endif |
50 | static long uniqbuf[UNIQBUF_SIZE / sizeof(long)]; | 46 | static long uniqbuf[UNIQBUF_SIZE / sizeof(long)]; |
51 | 47 | ||
@@ -908,12 +904,8 @@ static int create_album_index(void) | |||
908 | artist_seek = artist[j].seek; | 904 | artist_seek = artist[j].seek; |
909 | rb->memset(&tcs, 0, sizeof(struct tagcache_search) ); | 905 | rb->memset(&tcs, 0, sizeof(struct tagcache_search) ); |
910 | rb->tagcache_search(&tcs, tag_album); | 906 | rb->tagcache_search(&tcs, tag_album); |
911 | #if UNIQBUF_SIZE > 0 | 907 | /* Prevent duplicate entries in the search list. */ |
912 | /* Prevent duplicate entries in the search list. */ | ||
913 | rb->tagcache_search_set_uniqbuf(&tcs, uniqbuf, UNIQBUF_SIZE); | 908 | rb->tagcache_search_set_uniqbuf(&tcs, uniqbuf, UNIQBUF_SIZE); |
914 | #else | ||
915 | (void) uniqbuf; | ||
916 | #endif | ||
917 | rb->tagcache_search_add_filter(&tcs, tag_albumartist, artist_seek); | 909 | rb->tagcache_search_add_filter(&tcs, tag_albumartist, artist_seek); |
918 | while (rb->tagcache_get_next(&tcs)) | 910 | while (rb->tagcache_get_next(&tcs)) |
919 | { | 911 | { |
@@ -950,7 +942,7 @@ static int create_album_index(void) | |||
950 | 942 | ||
951 | static int save_album_index(void){ | 943 | static int save_album_index(void){ |
952 | int fd; | 944 | int fd; |
953 | fd = rb->creat(CACHE_PREFIX PLUGIN_DEMOS_DATA_DIR "/album_ndx.tmp",0666); | 945 | fd = rb->creat(PLUGIN_DIR "/demos/album_ndx.tmp",0666); |
954 | if(fd >= 0) | 946 | if(fd >= 0) |
955 | { | 947 | { |
956 | int unsigned_size = sizeof(unsigned int); | 948 | int unsigned_size = sizeof(unsigned int); |
@@ -973,7 +965,7 @@ static int save_album_index(void){ | |||
973 | /*Loads the artists+albums index information stored in the hard drive*/ | 965 | /*Loads the artists+albums index information stored in the hard drive*/ |
974 | 966 | ||
975 | static int load_album_index(void){ | 967 | static int load_album_index(void){ |
976 | int fr = rb->open(CACHE_PREFIX PLUGIN_DEMOS_DATA_DIR "/album_ndx.tmp", O_RDONLY); | 968 | int fr = rb->open(PLUGIN_DIR "/demos/album_ndx.tmp", O_RDONLY); |
977 | if (fr >= 0){ | 969 | if (fr >= 0){ |
978 | int unsigned_size = sizeof(unsigned int); | 970 | int unsigned_size = sizeof(unsigned int); |
979 | int int_size = sizeof(int); | 971 | int int_size = sizeof(int); |
@@ -1049,8 +1041,7 @@ static int get_wps_current_index(void) | |||
1049 | for( i=0; i < album_count; i++ ) | 1041 | for( i=0; i < album_count; i++ ) |
1050 | { | 1042 | { |
1051 | if(!rb->strcmp(album_names + album[i].name_idx, id3->album) && | 1043 | if(!rb->strcmp(album_names + album[i].name_idx, id3->album) && |
1052 | !rb->strcmp(artist_names + artist[album[i].artist_idx].name_idx, | 1044 | !rb->strcmp(artist_names + artist[album[i].artist_idx].name_idx, id3->albumartist)) |
1053 | id3->albumartist)) | ||
1054 | return i; | 1045 | return i; |
1055 | } | 1046 | } |
1056 | } | 1047 | } |
@@ -1080,9 +1071,7 @@ static void create_track_index(const int slide_index) | |||
1080 | goto fail; | 1071 | goto fail; |
1081 | 1072 | ||
1082 | rb->tagcache_search_add_filter(&tcs, tag_album, album[slide_index].seek); | 1073 | rb->tagcache_search_add_filter(&tcs, tag_album, album[slide_index].seek); |
1083 | rb->tagcache_search_add_filter(&tcs, tag_albumartist, | 1074 | rb->tagcache_search_add_filter(&tcs, tag_albumartist, artist[album[slide_index].artist_idx].seek); |
1084 | artist[album[slide_index].artist_idx].seek); | ||
1085 | |||
1086 | track_count=0; | 1075 | track_count=0; |
1087 | int string_index = 0, track_num; | 1076 | int string_index = 0, track_num; |
1088 | int disc_num; | 1077 | int disc_num; |
@@ -1198,8 +1187,7 @@ static bool get_albumart_for_index_from_db(const int slide_index, char *buf, | |||
1198 | bool result; | 1187 | bool result; |
1199 | /* find the first track of the album */ | 1188 | /* find the first track of the album */ |
1200 | rb->tagcache_search_add_filter(&tcs, tag_album, album[slide_index].seek); | 1189 | rb->tagcache_search_add_filter(&tcs, tag_album, album[slide_index].seek); |
1201 | rb->tagcache_search_add_filter(&tcs, tag_albumartist, | 1190 | rb->tagcache_search_add_filter(&tcs, tag_albumartist, artist[album[slide_index].artist_idx].seek); |
1202 | artist[album[slide_index].artist_idx].seek); | ||
1203 | 1191 | ||
1204 | if ( rb->tagcache_get_next(&tcs) ) { | 1192 | if ( rb->tagcache_get_next(&tcs) ) { |
1205 | struct mp3entry id3; | 1193 | struct mp3entry id3; |