1
0
Fork 0
forked from len0rd/rockbox

Fix the missing entries in the ID3 info screen.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@12269 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Magnus Holmgren 2007-02-11 08:06:24 +00:00
parent e84ff179cb
commit 87e41e8e9c

View file

@ -1125,20 +1125,8 @@ bool shutdown_screen(void)
} }
#endif #endif
#if CONFIG_CODEC == SWCODEC static const int id3_headers[]=
#define ID3_ITEMS 13
#else
#define ID3_ITEMS 11
#endif
static char * id3_get_info(int selected_item, void* data, char *buffer)
{ {
struct mp3entry* id3 =(struct mp3entry*)data;
int info_no=selected_item/2;
if(!(selected_item%2))
{/* header */
static const int headers[]=
{
LANG_ID3_TITLE, LANG_ID3_TITLE,
LANG_ID3_ARTIST, LANG_ID3_ARTIST,
LANG_ID3_ALBUM, LANG_ID3_ALBUM,
@ -1156,8 +1144,15 @@ static char * id3_get_info(int selected_item, void* data, char *buffer)
LANG_ID3_ALBUM_GAIN, LANG_ID3_ALBUM_GAIN,
#endif #endif
LANG_ID3_PATH, LANG_ID3_PATH,
}; };
return( str(headers[info_no]));
static char * id3_get_info(int selected_item, void* data, char *buffer)
{
struct mp3entry* id3 =(struct mp3entry*)data;
int info_no=selected_item/2;
if(!(selected_item%2))
{/* header */
return( str(id3_headers[info_no]));
} }
else else
{/* data */ {/* data */
@ -1246,7 +1241,8 @@ bool browse_id3(void)
int key; int key;
gui_synclist_init(&id3_lists, &id3_get_info, id3, true, 2); gui_synclist_init(&id3_lists, &id3_get_info, id3, true, 2);
gui_synclist_set_nb_items(&id3_lists, ID3_ITEMS*2); gui_synclist_set_nb_items(&id3_lists,
sizeof(id3_headers)/sizeof(id3_headers[0])*2);
gui_synclist_draw(&id3_lists); gui_synclist_draw(&id3_lists);
gui_syncstatusbar_draw(&statusbars, true); gui_syncstatusbar_draw(&statusbars, true);
action_signalscreenchange(); action_signalscreenchange();