added %pn (playlist name) to wps

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@2651 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Robert Hak 2002-10-15 11:49:15 +00:00
parent 3148bc45b0
commit f9d3d1cd91
3 changed files with 20 additions and 0 deletions

View file

@ -111,6 +111,20 @@ int playlist_first_index(void)
return playlist.first_index;
}
void playlist_name(char *name, int name_size)
{
char buf[MAX_PATH+1];
int i = 0;
snprintf(buf, "%s", playlist.filename+playlist.dirlen);
while((buf[i] != '.') && (buf[i] != 0))
i++;
buf[i] = 0;
snprintf(name, name_size, "%s", buf);
return;
}
int playlist_next(int steps)
{
playlist.index = get_next_index(steps);