forked from len0rd/rockbox
dumb dumb dumb dumb dumb.....
some rearrangements of code.. bugs were in the tokentool tokenstream generator X.x.. dumb :/ git-svn-id: svn://svn.rockbox.org/rockbox/trunk@6380 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
6752d1310d
commit
238bea7370
5 changed files with 35 additions and 20 deletions
|
@ -87,8 +87,7 @@ void loadentry(int filerecord) {
|
|||
}
|
||||
|
||||
void loadsongdata() {
|
||||
if(currententry->loadedsongdata ||
|
||||
!currententry->loadedfiledata)
|
||||
if(currententry->loadedsongdata)
|
||||
return;
|
||||
currententry->title=(char *)my_malloc(rb->tagdbheader->songlen);
|
||||
currententry->genre=(char *)my_malloc(rb->tagdbheader->genrelen);
|
||||
|
@ -112,6 +111,9 @@ void loadartistname() {
|
|||
/* memory optimization possible, only malloc for an album name once, then
|
||||
* write that pointer to the entrys using it.
|
||||
*/
|
||||
if(currententry->loadedartistname)
|
||||
return;
|
||||
loadsongdata();
|
||||
currententry->artistname=(char *)my_malloc(rb->tagdbheader->artistlen);
|
||||
rb->lseek(*rb->tagdb_fd,currententry->artistoffset,SEEK_SET);
|
||||
rb->read(*rb->tagdb_fd,currententry->artistname,rb->tagdbheader->artistlen);
|
||||
|
@ -120,6 +122,9 @@ void loadartistname() {
|
|||
|
||||
void loadalbumname() {
|
||||
/* see the note at loadartistname */
|
||||
if(currententry->loadedalbumname)
|
||||
return;
|
||||
loadsongdata();
|
||||
currententry->albumname=(char *)my_malloc(rb->tagdbheader->albumlen);
|
||||
rb->lseek(*rb->tagdb_fd,currententry->albumoffset,SEEK_SET);
|
||||
rb->read(*rb->tagdb_fd,currententry->albumname,rb->tagdbheader->albumlen);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue