forked from len0rd/rockbox
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
This commit is contained in:
parent
86545174b9
commit
0b476f75f1
1 changed files with 6 additions and 2 deletions
|
|
@ -2186,8 +2186,12 @@ read_end:
|
|||
/* load prefs font if it is different than the global settings font */
|
||||
if (rb->strcmp(prefs.font, rb->global_settings->font_file)) {
|
||||
if (!change_font(prefs.font)) {
|
||||
/* fallback by re-loading the global settings font */
|
||||
if (!change_font(rb->global_settings->font_file))
|
||||
/* fallback by resetting prefs font to the global settings font */
|
||||
rb->memset(prefs.font, 0, MAX_PATH);
|
||||
rb->snprintf(prefs.font, MAX_PATH, "%s",
|
||||
rb->global_settings->font_file);
|
||||
|
||||
if (!change_font(prefs.font))
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue