forked from len0rd/rockbox
resume ask once option added
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@2672 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
a3e1648856
commit
c88751ffa5
4 changed files with 20 additions and 3 deletions
|
@ -237,7 +237,9 @@ eng: "Backlight"
|
|||
new:
|
||||
|
||||
id: LANG_BACKLIGHT_ON
|
||||
desc: in settings_menu,
|
||||
desc: in settings_menu
|
||||
eng: ""
|
||||
new:
|
||||
|
||||
id: LANG_SCROLL
|
||||
desc: in settings_menu
|
||||
|
@ -1020,3 +1022,10 @@ id: LANG_OSCILLOGRAPH
|
|||
desc: the name of the oscillograph demo in the demo menu
|
||||
eng: "Oscillograph"
|
||||
new:
|
||||
|
||||
id: LANG_RESUME_SETTING_ASK_ONCE
|
||||
desc: in settings_menu
|
||||
eng: "Ask Once"
|
||||
new:
|
||||
|
||||
|
||||
|
|
|
@ -31,7 +31,8 @@
|
|||
|
||||
#define RESUME_OFF 0
|
||||
#define RESUME_ASK 1
|
||||
#define RESUME_ON 2
|
||||
#define RESUME_ASK_ONCE 2
|
||||
#define RESUME_ON 3
|
||||
|
||||
#define FF_REWIND_1000 0
|
||||
#define FF_REWIND_2000 1
|
||||
|
|
|
@ -161,10 +161,11 @@ static bool resume(void)
|
|||
{
|
||||
char* names[] = { str(LANG_SET_BOOL_NO),
|
||||
str(LANG_RESUME_SETTING_ASK),
|
||||
str(LANG_RESUME_SETTING_ASK_ONCE),
|
||||
str(LANG_SET_BOOL_YES) };
|
||||
|
||||
return set_option( str(LANG_RESUME), &global_settings.resume,
|
||||
names, 3, NULL );
|
||||
names, 4, NULL );
|
||||
}
|
||||
|
||||
static bool backlight_on_when_charging(void)
|
||||
|
|
|
@ -454,6 +454,11 @@ bool ask_resume(void)
|
|||
if ( global_settings.resume == RESUME_ON )
|
||||
return true;
|
||||
|
||||
if ( global_settings.resume == RESUME_ASK_ONCE) {
|
||||
global_settings.resume_index = -1;
|
||||
settings_save();
|
||||
}
|
||||
|
||||
lcd_clear_display();
|
||||
lcd_puts(0,0,str(LANG_RESUME_ASK));
|
||||
#ifdef HAVE_LCD_CHARCELLS
|
||||
|
@ -463,6 +468,7 @@ bool ask_resume(void)
|
|||
lcd_puts(0,2,str(LANG_RESUME_CANCEL_RECORDER));
|
||||
#endif
|
||||
lcd_update();
|
||||
|
||||
if (button_get(true) == BUTTON_PLAY)
|
||||
return true;
|
||||
return false;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue