summaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorBjörn Stenberg <bjorn@haxx.se>2002-10-09 23:13:25 +0000
committerBjörn Stenberg <bjorn@haxx.se>2002-10-09 23:13:25 +0000
commit227253cfe4ab16c9758473194271ed48bf2e28b1 (patch)
tree8ebd8cbaa4cc11e08888277148633c480f9329ab /apps
parentd4b884e7e0568d33e4f1bfad51886f6a87373d53 (diff)
downloadrockbox-227253cfe4ab16c9758473194271ed48bf2e28b1.tar.gz
rockbox-227253cfe4ab16c9758473194271ed48bf2e28b1.tar.bz2
rockbox-227253cfe4ab16c9758473194271ed48bf2e28b1.zip
'Reset settings' now also resets wps, font and language (although you have to reboot to get back to the old language).
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@2552 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps')
-rw-r--r--apps/settings.c9
-rw-r--r--apps/wps-display.c6
-rw-r--r--apps/wps-display.h1
3 files changed, 16 insertions, 0 deletions
diff --git a/apps/settings.c b/apps/settings.c
index eb4409c805..0a3cd67d67 100644
--- a/apps/settings.c
+++ b/apps/settings.c
@@ -383,6 +383,9 @@ void settings_apply(void)
global_settings.wps_file);
wps_load(buf, false);
}
+ else
+ wps_reset();
+
#ifdef HAVE_LCD_BITMAP
if ( global_settings.font_file[0] &&
global_settings.font_file[0] != 0xff ) {
@@ -390,7 +393,10 @@ void settings_apply(void)
global_settings.font_file);
font_load(buf);
}
+ else
+ font_reset();
#endif
+
if ( global_settings.lang_file[0] &&
global_settings.lang_file[0] != 0xff ) {
snprintf(buf, sizeof buf, ROCKBOX_DIR "/%s.lng",
@@ -673,6 +679,9 @@ void settings_reset(void) {
global_settings.peak_meter_release = 8;
global_settings.peak_meter_hold = 1;
global_settings.peak_meter_clip_hold = 16;
+ global_settings.wps_file[0] = 0;
+ global_settings.font_file[0] = 0;
+ global_settings.lang_file[0] = 0;
}
diff --git a/apps/wps-display.c b/apps/wps-display.c
index 3dda50842f..0e31be3ffa 100644
--- a/apps/wps-display.c
+++ b/apps/wps-display.c
@@ -111,6 +111,12 @@ static void wps_format(char* fmt)
}
}
+void wps_reset(void)
+{
+ wps_loaded = false;
+ memset(&format_buffer, 0, sizeof format_buffer);
+}
+
bool wps_load(char* file, bool display)
{
char buffer[FORMAT_BUFFER_SIZE];
diff --git a/apps/wps-display.h b/apps/wps-display.h
index 970bca1842..fc40e19136 100644
--- a/apps/wps-display.h
+++ b/apps/wps-display.h
@@ -25,6 +25,7 @@
bool wps_refresh(struct mp3entry* id3, int ffwd_offset, bool refresh_scroll);
bool wps_display(struct mp3entry* id3);
bool wps_load(char* file, bool display);
+void wps_reset(void);
#ifdef HAVE_LCD_CHARCELLS
bool draw_player_progress(struct mp3entry* id3, int ff_rewind_count);