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 | |
parent | 25b1e1b8bd16132b80e0a24867291ff116ec01a7 (diff) | |
download | rockbox-7c29125.tar.gz rockbox-7c29125.zip |
Revert "Pictureflow Fixes: Sansa C200"
This reverts commit b7f2cc5d6d697aa40d8a568cf573ee100c32b9c4.
Change-Id: I51ec9f5fade10ce0173ed45739af6baaa5c7f746
-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 @@ + /* Capacity 10 000 entries (for example 10k different albums) */ #if PLUGIN_BUFFER_SIZE > 0x10000 #define UNIQBUF_SIZE (64*1024) -#else - #if PLUGIN_BUFFER_SIZE > 0x8000 - /*Bugfix -- Several players havent enough Ram to allow such a large buffer */ - #define UNIQBUF_SIZE (16*1024) - #else - #define UNIQBUF_SIZE 0 - #endif +#else /*Bugfix -- Several players havent enough Ram to allow such a large buffer */ + #define UNIQBUF_SIZE (16*1024) #endif static long uniqbuf[UNIQBUF_SIZE / sizeof(long)]; @@ -908,12 +904,8 @@ static int create_album_index(void) artist_seek = artist[j].seek; rb->memset(&tcs, 0, sizeof(struct tagcache_search) ); rb->tagcache_search(&tcs, tag_album); -#if UNIQBUF_SIZE > 0 - /* Prevent duplicate entries in the search list. */ + /* Prevent duplicate entries in the search list. */ rb->tagcache_search_set_uniqbuf(&tcs, uniqbuf, UNIQBUF_SIZE); -#else - (void) uniqbuf; -#endif rb->tagcache_search_add_filter(&tcs, tag_albumartist, artist_seek); while (rb->tagcache_get_next(&tcs)) { @@ -950,7 +942,7 @@ static int create_album_index(void) static int save_album_index(void){ int fd; - fd = rb->creat(CACHE_PREFIX PLUGIN_DEMOS_DATA_DIR "/album_ndx.tmp",0666); + fd = rb->creat(PLUGIN_DIR "/demos/album_ndx.tmp",0666); if(fd >= 0) { int unsigned_size = sizeof(unsigned int); @@ -973,7 +965,7 @@ static int save_album_index(void){ /*Loads the artists+albums index information stored in the hard drive*/ static int load_album_index(void){ - int fr = rb->open(CACHE_PREFIX PLUGIN_DEMOS_DATA_DIR "/album_ndx.tmp", O_RDONLY); + int fr = rb->open(PLUGIN_DIR "/demos/album_ndx.tmp", O_RDONLY); if (fr >= 0){ int unsigned_size = sizeof(unsigned int); int int_size = sizeof(int); @@ -1049,8 +1041,7 @@ static int get_wps_current_index(void) for( i=0; i < album_count; i++ ) { if(!rb->strcmp(album_names + album[i].name_idx, id3->album) && - !rb->strcmp(artist_names + artist[album[i].artist_idx].name_idx, - id3->albumartist)) + !rb->strcmp(artist_names + artist[album[i].artist_idx].name_idx, id3->albumartist)) return i; } } @@ -1080,9 +1071,7 @@ static void create_track_index(const int slide_index) goto fail; rb->tagcache_search_add_filter(&tcs, tag_album, album[slide_index].seek); - rb->tagcache_search_add_filter(&tcs, tag_albumartist, - artist[album[slide_index].artist_idx].seek); - + rb->tagcache_search_add_filter(&tcs, tag_albumartist, artist[album[slide_index].artist_idx].seek); track_count=0; int string_index = 0, track_num; int disc_num; @@ -1198,8 +1187,7 @@ static bool get_albumart_for_index_from_db(const int slide_index, char *buf, bool result; /* find the first track of the album */ rb->tagcache_search_add_filter(&tcs, tag_album, album[slide_index].seek); - rb->tagcache_search_add_filter(&tcs, tag_albumartist, - artist[album[slide_index].artist_idx].seek); + rb->tagcache_search_add_filter(&tcs, tag_albumartist, artist[album[slide_index].artist_idx].seek); if ( rb->tagcache_get_next(&tcs) ) { struct mp3entry id3; |