diff options
author | Tomer Shalev <shalev.tomer@gmail.com> | 2010-04-09 06:26:33 +0000 |
---|---|---|
committer | Tomer Shalev <shalev.tomer@gmail.com> | 2010-04-09 06:26:33 +0000 |
commit | 0b476f75f1eda25a7a3a7abdeaab8155cc3138c2 (patch) | |
tree | 16819e17f349afa212bd185217f57fc751bd8b14 | |
parent | 86545174b98c576d75adacf1f1ae9e65ebfedd9b (diff) | |
download | rockbox-0b476f75f1eda25a7a3a7abdeaab8155cc3138c2.tar.gz rockbox-0b476f75f1eda25a7a3a7abdeaab8155cc3138c2.zip |
Text viewer: When loading settings and prefs font loading fails, not only
refert to the global settings font, but also set the viewer prefs font to that
font, so that when the user re-opens the viewer no warning will appear again,
and also so that when the user selects new font, the currenly used font will be
selected
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25550 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r-- | apps/plugins/viewer.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/apps/plugins/viewer.c b/apps/plugins/viewer.c index 519c8a23dc..271ca37630 100644 --- a/apps/plugins/viewer.c +++ b/apps/plugins/viewer.c | |||
@@ -2186,8 +2186,12 @@ read_end: | |||
2186 | /* load prefs font if it is different than the global settings font */ | 2186 | /* load prefs font if it is different than the global settings font */ |
2187 | if (rb->strcmp(prefs.font, rb->global_settings->font_file)) { | 2187 | if (rb->strcmp(prefs.font, rb->global_settings->font_file)) { |
2188 | if (!change_font(prefs.font)) { | 2188 | if (!change_font(prefs.font)) { |
2189 | /* fallback by re-loading the global settings font */ | 2189 | /* fallback by resetting prefs font to the global settings font */ |
2190 | if (!change_font(rb->global_settings->font_file)) | 2190 | rb->memset(prefs.font, 0, MAX_PATH); |
2191 | rb->snprintf(prefs.font, MAX_PATH, "%s", | ||
2192 | rb->global_settings->font_file); | ||
2193 | |||
2194 | if (!change_font(prefs.font)) | ||
2191 | return false; | 2195 | return false; |
2192 | } | 2196 | } |
2193 | } | 2197 | } |