summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLinus Nielsen Feltzing <linus@haxx.se>2002-06-10 07:58:04 +0000
committerLinus Nielsen Feltzing <linus@haxx.se>2002-06-10 07:58:04 +0000
commitd044f5575fa530023a991dd90ab8f270819e7b74 (patch)
tree800cbed9d2d62036c125db34cbe5e2ebdc8c8ddb
parent6229aa2e6f9d4576af9567e7fb292ebb0751d981 (diff)
downloadrockbox-d044f5575fa530023a991dd90ab8f270819e7b74.zip
rockbox-d044f5575fa530023a991dd90ab8f270819e7b74.tar.gz
rockbox-d044f5575fa530023a991dd90ab8f270819e7b74.tar.bz2
rockbox-d044f5575fa530023a991dd90ab8f270819e7b74.tar.xz
Changed prototype of playtune
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@926 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r--apps/play.c11
-rw-r--r--apps/play.h2
-rw-r--r--apps/tree.c2
3 files changed, 8 insertions, 7 deletions
diff --git a/apps/play.c b/apps/play.c
index aae7895..5949372 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 b63df29..a8e68a6 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 b0c17d3..7bb473f 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);