forked from len0rd/rockbox
bandaid fix for FS#8168 - statusbar would be enabled if poweroff happened while in fm screen. a proper fix is to not force the statusbar on in the fm screen, but untill that happens this is fine.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16044 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
6a56c14e17
commit
4d238c14d7
4 changed files with 18 additions and 1 deletions
|
|
@ -462,6 +462,7 @@ int radio_screen(void)
|
|||
in_screen = true;
|
||||
|
||||
/* always display status bar in radio screen for now */
|
||||
global_status.statusbar_forced = statusbar?0:1;
|
||||
global_settings.statusbar = true;
|
||||
FOR_NB_SCREENS(i)
|
||||
{
|
||||
|
|
@ -1029,7 +1030,7 @@ int radio_screen(void)
|
|||
|
||||
/* restore status bar settings */
|
||||
global_settings.statusbar = statusbar;
|
||||
|
||||
global_status.statusbar_forced = 0;
|
||||
in_screen = false;
|
||||
#if CONFIG_CODEC != SWCODEC
|
||||
return have_recorded;
|
||||
|
|
|
|||
|
|
@ -458,6 +458,11 @@ static bool settings_write_config(char* filename, int options)
|
|||
fd = open(filename,O_CREAT|O_TRUNC|O_WRONLY);
|
||||
if (fd < 0)
|
||||
return false;
|
||||
#if CONFIG_TUNER
|
||||
bool statusbar = global_settings.statusbar;
|
||||
if (global_status.statusbar_forced != 0 && statusbar)
|
||||
global_settings.statusbar = false;
|
||||
#endif
|
||||
fdprintf(fd, "# .cfg file created by rockbox %s - "
|
||||
"http://www.rockbox.org\r\n\r\n", appsversion);
|
||||
for(i=0; i<nb_settings; i++)
|
||||
|
|
@ -536,6 +541,9 @@ static bool settings_write_config(char* filename, int options)
|
|||
fdprintf(fd,"%s: %s\r\n",settings[i].cfg_name,value);
|
||||
} /* for(...) */
|
||||
close(fd);
|
||||
#if CONFIG_TUNER
|
||||
global_settings.statusbar = statusbar;
|
||||
#endif
|
||||
return true;
|
||||
}
|
||||
#ifndef HAVE_RTC_RAM
|
||||
|
|
|
|||
|
|
@ -269,6 +269,11 @@ struct system_status
|
|||
#if CONFIG_TUNER
|
||||
int last_frequency; /* Last frequency for resuming, in FREQ_STEP units,
|
||||
relative to MIN_FREQ */
|
||||
int statusbar_forced; /* fix the bug where the statusbar would stay shown
|
||||
if powered off inside the fm screen...
|
||||
for some reason the screen doesnt use global_settings.statusbar
|
||||
obviously a better fix is to fix the screen... so remove this
|
||||
when that happens */
|
||||
#endif
|
||||
char last_screen;
|
||||
int viewer_icon_count;
|
||||
|
|
|
|||
|
|
@ -1175,6 +1175,9 @@ const struct settings_list settings[] = {
|
|||
3, "list_accel_wait", UNIT_SEC, 1, 10, 1,
|
||||
scanaccel_formatter, getlang_unit_0_is_off, NULL),
|
||||
#endif /* HAVE_SCROLLWHEEL */
|
||||
#if CONFIG_TUNER
|
||||
SYSTEM_SETTING(0, statusbar_forced, 0),
|
||||
#endif
|
||||
};
|
||||
|
||||
const int nb_settings = sizeof(settings)/sizeof(*settings);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue