Changed to runtime playlist initialization
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@3602 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
233b7f3fb2
commit
7bb746b4fe
3 changed files with 9 additions and 16 deletions
|
@ -48,6 +48,7 @@
|
|||
#include "font.h"
|
||||
#include "language.h"
|
||||
#include "wps-display.h"
|
||||
#include "playlist.h"
|
||||
|
||||
char appsversion[]=APPSVERSION;
|
||||
|
||||
|
@ -176,6 +177,7 @@ void init(void)
|
|||
status_init();
|
||||
usb_start_monitoring();
|
||||
power_init();
|
||||
playlist_init();
|
||||
}
|
||||
|
||||
int main(void)
|
||||
|
|
|
@ -38,22 +38,7 @@
|
|||
|
||||
#include "lang.h"
|
||||
|
||||
static struct playlist_info playlist={
|
||||
"", /* filename */
|
||||
-1, /* fd */
|
||||
0, /* dirlen */
|
||||
{0}, /* indices[] */
|
||||
0, /* index */
|
||||
0, /* first_index */
|
||||
0, /* seed */
|
||||
0, /* amount */
|
||||
false, /* in_ram */
|
||||
{0}, /* queue_indices[] */
|
||||
0, /* last_queue_index */
|
||||
0, /* queue_index */
|
||||
0, /* num_queued */
|
||||
0 /* start_queue */
|
||||
};
|
||||
static struct playlist_info playlist;
|
||||
|
||||
#define QUEUE_FILE ROCKBOX_DIR "/.queue_file"
|
||||
|
||||
|
@ -65,6 +50,11 @@ static int playlist_end_pos = 0;
|
|||
|
||||
static char now_playing[MAX_PATH+1];
|
||||
|
||||
void playlist_init(void)
|
||||
{
|
||||
playlist.fd = -1;
|
||||
}
|
||||
|
||||
/*
|
||||
* remove any files and indices associated with the playlist
|
||||
*/
|
||||
|
|
|
@ -49,6 +49,7 @@ struct playlist_info
|
|||
extern struct playlist_info playlist;
|
||||
extern bool playlist_shuffle;
|
||||
|
||||
void playlist_init(void);
|
||||
int play_list(char *dir, char *file, int start_index,
|
||||
bool shuffled_index, int start_offset,
|
||||
int random_seed, int first_index, int queue_resume,
|
||||
|
|
Loading…
Reference in a new issue