forked from len0rd/rockbox
mpegplayer: A) Replace 'Start Menu' option with 'Resume Settings' 1) Start menu - Always show the start menu 2) Start menu if not completed - show the start menu if playback was interrupted before finishing (equivalent to the previous 'Resume No/Yes' screen) 3) Resume automatically - Always resume immediately with no prompting 4) Play from beginning - Always play file from the beginning. B) Do everything possible at this time to ensure USB connection and power down preserve the resume time. C) Add Settings menu to start menu D) Small OSD erasure drawing tweak.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16061 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
41cd44caa7
commit
29775f7bab
4 changed files with 436 additions and 279 deletions
|
|
@ -1,6 +1,10 @@
|
|||
|
||||
#include "plugin.h"
|
||||
|
||||
#define SETTINGS_VERSION 3
|
||||
#define SETTINGS_MIN_VERSION 1
|
||||
#define SETTINGS_FILENAME "mpegplayer.cfg"
|
||||
|
||||
#if defined(TOSHIBA_GIGABEAT_F) || defined(SANSA_E200) || defined(SANSA_C200)
|
||||
#define MPEG_OPTION_DITHERING_ENABLED 1
|
||||
#endif
|
||||
|
|
@ -19,12 +23,23 @@ enum mpeg_option_id
|
|||
MPEG_OPTION_SKIP_FRAMES,
|
||||
};
|
||||
|
||||
enum mpeg_resume_id
|
||||
{
|
||||
MPEG_RESUME_MENU_ALWAYS = 0,
|
||||
MPEG_RESUME_MENU_IF_INCOMPLETE,
|
||||
MPEG_RESUME_RESTART,
|
||||
MPEG_RESUME_ALWAYS,
|
||||
MPEG_RESUME_NUM_OPTIONS,
|
||||
};
|
||||
|
||||
enum mpeg_start_id
|
||||
{
|
||||
MPEG_START_RESTART,
|
||||
MPEG_START_RESUME,
|
||||
MPEG_START_SEEK,
|
||||
MPEG_START_SETTINGS,
|
||||
MPEG_START_QUIT,
|
||||
MPEG_START_EXIT,
|
||||
};
|
||||
|
||||
enum mpeg_menu_id
|
||||
|
|
@ -39,7 +54,7 @@ struct mpeg_settings {
|
|||
int showfps; /* flag to display fps */
|
||||
int limitfps; /* flag to limit fps */
|
||||
int skipframes; /* flag to skip frames */
|
||||
int enable_start_menu; /* flag to enable/disable start menu */
|
||||
int resume_options; /* type of resume action at start */
|
||||
int resume_count; /* total # of resumes in config file */
|
||||
int resume_time; /* resume time for current mpeg (in half minutes) */
|
||||
char resume_filename[MAX_PATH]; /* filename of current mpeg */
|
||||
|
|
@ -50,9 +65,18 @@ struct mpeg_settings {
|
|||
|
||||
extern struct mpeg_settings settings;
|
||||
|
||||
int get_start_time(uint32_t duration);
|
||||
enum mpeg_start_id mpeg_start_menu(uint32_t duration);
|
||||
enum mpeg_menu_id mpeg_menu(void);
|
||||
int mpeg_start_menu(uint32_t duration);
|
||||
|
||||
enum
|
||||
{
|
||||
MPEG_MENU_HIDE_QUIT_ITEM = 0x1, /* Don't show the quit item */
|
||||
};
|
||||
|
||||
int mpeg_menu(unsigned flags);
|
||||
void mpeg_menu_sysevent_clear(void);
|
||||
long mpeg_menu_sysevent(void);
|
||||
int mpeg_menu_sysevent_callback(int btn, int menu);
|
||||
void mpeg_menu_sysevent_handle(void);
|
||||
|
||||
void init_settings(const char* filename);
|
||||
void save_settings(void);
|
||||
void clear_resume_count(void);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue