From 4d238c14d70199e3a991db0c3b938eb4b0f6c93a Mon Sep 17 00:00:00 2001 From: Jonathan Gordon Date: Thu, 10 Jan 2008 06:46:04 +0000 Subject: 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 --- apps/recorder/radio.c | 3 ++- apps/settings.c | 8 ++++++++ apps/settings.h | 5 +++++ apps/settings_list.c | 3 +++ 4 files changed, 18 insertions(+), 1 deletion(-) diff --git a/apps/recorder/radio.c b/apps/recorder/radio.c index d576755..0e43cc6 100644 --- a/apps/recorder/radio.c +++ b/apps/recorder/radio.c @@ -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; diff --git a/apps/settings.c b/apps/settings.c index 2814a6f..26b9434 100644 --- a/apps/settings.c +++ b/apps/settings.c @@ -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