forked from len0rd/rockbox
Remove use of uniqbuf in PictureFlow, preventing crash on 64-bit sim and freeing half of the plugin buffer on targets.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21109 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
2a194c951d
commit
dda7580f8a
1 changed files with 3 additions and 8 deletions
|
@ -216,8 +216,6 @@ typedef fb_data pix_t;
|
||||||
#define EV_EXIT 9999
|
#define EV_EXIT 9999
|
||||||
#define EV_WAKEUP 1337
|
#define EV_WAKEUP 1337
|
||||||
|
|
||||||
#define UNIQBUF_SIZE (64*1024)
|
|
||||||
|
|
||||||
#define EMPTY_SLIDE CACHE_PREFIX "/emptyslide.pfraw"
|
#define EMPTY_SLIDE CACHE_PREFIX "/emptyslide.pfraw"
|
||||||
#define EMPTY_SLIDE_BMP PLUGIN_DEMOS_DIR "/pictureflow_emptyslide.bmp"
|
#define EMPTY_SLIDE_BMP PLUGIN_DEMOS_DIR "/pictureflow_emptyslide.bmp"
|
||||||
#define SPLASH_BMP PLUGIN_DEMOS_DIR "/pictureflow_splash.bmp"
|
#define SPLASH_BMP PLUGIN_DEMOS_DIR "/pictureflow_splash.bmp"
|
||||||
|
@ -705,13 +703,10 @@ void init_reflect_table(void)
|
||||||
*/
|
*/
|
||||||
int create_album_index(void)
|
int create_album_index(void)
|
||||||
{
|
{
|
||||||
buf_size -= UNIQBUF_SIZE * sizeof(long);
|
album = ((struct album_data *)(buf_size + (char *) buf)) - 1;
|
||||||
long *uniqbuf = (long *)(buf_size + (char *)buf);
|
|
||||||
album = ((struct album_data *)uniqbuf) - 1;
|
|
||||||
rb->memset(&tcs, 0, sizeof(struct tagcache_search) );
|
rb->memset(&tcs, 0, sizeof(struct tagcache_search) );
|
||||||
album_count = 0;
|
album_count = 0;
|
||||||
rb->tagcache_search(&tcs, tag_album);
|
rb->tagcache_search(&tcs, tag_album);
|
||||||
rb->tagcache_search_set_uniqbuf(&tcs, uniqbuf, UNIQBUF_SIZE);
|
|
||||||
unsigned int l, old_l = 0;
|
unsigned int l, old_l = 0;
|
||||||
album_names = buf;
|
album_names = buf;
|
||||||
album[0].name_idx = 0;
|
album[0].name_idx = 0;
|
||||||
|
@ -729,9 +724,10 @@ int create_album_index(void)
|
||||||
rb->strcpy(buf, tcs.result);
|
rb->strcpy(buf, tcs.result);
|
||||||
buf_size -= l;
|
buf_size -= l;
|
||||||
buf = l + (char *)buf;
|
buf = l + (char *)buf;
|
||||||
|
DEBUGF("%lX: %s\n", tcs.idxfd[tag_album] ? rb->lseek(tcs.idxfd[tag_album], 0, SEEK_CUR) : -1, tcs.result);
|
||||||
album[-album_count].seek = tcs.result_seek;
|
album[-album_count].seek = tcs.result_seek;
|
||||||
old_l = l;
|
old_l = l;
|
||||||
album_count++;
|
album_count++;
|
||||||
}
|
}
|
||||||
rb->tagcache_search_finish(&tcs);
|
rb->tagcache_search_finish(&tcs);
|
||||||
ALIGN_BUFFER(buf, buf_size, 4);
|
ALIGN_BUFFER(buf, buf_size, 4);
|
||||||
|
@ -741,7 +737,6 @@ int create_album_index(void)
|
||||||
tmp_album[i] = album[-i];
|
tmp_album[i] = album[-i];
|
||||||
album = tmp_album;
|
album = tmp_album;
|
||||||
buf = album + album_count;
|
buf = album + album_count;
|
||||||
buf_size += UNIQBUF_SIZE * sizeof(long);
|
|
||||||
return (album_count > 0) ? 0 : ERROR_NO_ALBUMS;
|
return (album_count > 0) ? 0 : ERROR_NO_ALBUMS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue