From d044f5575fa530023a991dd90ab8f270819e7b74 Mon Sep 17 00:00:00 2001 From: Linus Nielsen Feltzing Date: Mon, 10 Jun 2002 07:58:04 +0000 Subject: [PATCH] Changed prototype of playtune git-svn-id: svn://svn.rockbox.org/rockbox/trunk@926 a1c6a512-1295-4272-9138-f99709370657 --- apps/play.c | 11 ++++++----- apps/play.h | 2 +- apps/tree.c | 2 +- 3 files changed, 8 insertions(+), 7 deletions(-) diff --git a/apps/play.c b/apps/play.c index aae7895d87..5949372e04 100644 --- a/apps/play.c +++ b/apps/play.c @@ -38,15 +38,16 @@ #define LINE_Y 1 /* initial line */ -void playtune(char *dir, char *file) +void playtune(char *filename) { static char mfile[256]; - char buffer[256]; mp3entry mp3; bool good=1; +#ifdef HAVE_LCD_BITMAP + char buffer[256]; +#endif - snprintf(buffer, sizeof(buffer), "%s/%s", dir, file); - if(mp3info(&mp3, buffer)) { + if(mp3info(&mp3, filename)) { DEBUGF("id3 failure!"); good=0; } @@ -84,7 +85,7 @@ void playtune(char *dir, char *file) lcd_update(); #endif - snprintf(mfile, sizeof(mfile), "%s/%s", dir, file); + strncpy(mfile, filename, 256); mpeg_play(mfile); while(1) { diff --git a/apps/play.h b/apps/play.h index b63df29c82..a8e68a61b6 100644 --- a/apps/play.h +++ b/apps/play.h @@ -17,4 +17,4 @@ * ****************************************************************************/ -void playtune(char *dir, char *file); +void playtune(char *filename); diff --git a/apps/tree.c b/apps/tree.c index b0c17d3a42..7bb473f28e 100644 --- a/apps/tree.c +++ b/apps/tree.c @@ -310,7 +310,7 @@ bool dirbrowse(char *root) else { playing = 1; - playtune(currdir, dircacheptr[dircursor+start]->name); + playtune(buf); playing = 0; #ifdef HAVE_LCD_BITMAP lcd_setmargins(0, MARGIN_Y);