forked from len0rd/rockbox
Added backslash and drive letter support
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@1029 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
0530349c1f
commit
5a8a5b54f5
1 changed files with 13 additions and 2 deletions
|
|
@ -39,6 +39,7 @@ char* playlist_next(int type)
|
|||
int seek = playlist.indices[playlist.index];
|
||||
int max;
|
||||
int fd;
|
||||
int i;
|
||||
(void)type; /* prevent compiler warning until this is gets used */
|
||||
|
||||
playlist.index = (playlist.index+1) % playlist.amount;
|
||||
|
|
@ -58,11 +59,21 @@ char* playlist_next(int type)
|
|||
|
||||
now_playing[seek]=0;
|
||||
|
||||
/* replace backslashes with forward slashes */
|
||||
for ( i=1; i<seek; i++ )
|
||||
if ( now_playing[i] == '\\' )
|
||||
now_playing[i] = '/';
|
||||
|
||||
if('/' == now_playing[1])
|
||||
return &now_playing[1];
|
||||
else {
|
||||
now_playing[0]='/';
|
||||
return now_playing;
|
||||
/* handle dos style drive letter */
|
||||
if ( ':' == now_playing[2] )
|
||||
return &now_playing[3];
|
||||
else {
|
||||
now_playing[0]='/';
|
||||
return now_playing;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue