forked from len0rd/rockbox
Restore the 'read_disk' flag for settings_apply that was removed in r24922. It is still needed to prevent uncessary disk I/O for fonts etc. Should fix FS#11071 (I haven't tested it on a HD-based player).
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25042 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
8050d47a4e
commit
a14f4acb0c
6 changed files with 49 additions and 45 deletions
|
|
@ -400,7 +400,7 @@ bool quick_screen_quick(int button_enter)
|
|||
if (gui_syncquickscreen_run(&qs, button_enter))
|
||||
{
|
||||
settings_save();
|
||||
settings_apply();
|
||||
settings_apply(false);
|
||||
/* make sure repeat/shuffle/any other nasty ones get updated */
|
||||
if ( oldrepeat != global_settings.repeat_mode &&
|
||||
(audio_status() & AUDIO_STATUS_PLAY) )
|
||||
|
|
@ -437,7 +437,7 @@ bool quick_screen_f3(int button_enter)
|
|||
if (gui_syncquickscreen_run(&qs, button_enter))
|
||||
{
|
||||
settings_save();
|
||||
settings_apply();
|
||||
settings_apply(false);
|
||||
}
|
||||
return(0);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -337,7 +337,7 @@ static void init(void)
|
|||
storage_init();
|
||||
settings_reset();
|
||||
settings_load(SETTINGS_ALL);
|
||||
settings_apply();
|
||||
settings_apply(false);
|
||||
init_dircache(true);
|
||||
init_dircache(false);
|
||||
#ifdef HAVE_TAGCACHE
|
||||
|
|
@ -376,6 +376,7 @@ static void init(void)
|
|||
audio_init();
|
||||
button_clear_queue(); /* Empty the keyboard buffer */
|
||||
|
||||
settings_apply(true);
|
||||
settings_apply_skins();
|
||||
}
|
||||
|
||||
|
|
@ -570,7 +571,7 @@ static void init(void)
|
|||
#endif
|
||||
}
|
||||
|
||||
settings_apply();
|
||||
settings_apply(false);
|
||||
init_dircache(false);
|
||||
#ifdef HAVE_TAGCACHE
|
||||
init_tagcache();
|
||||
|
|
@ -635,6 +636,7 @@ static void init(void)
|
|||
#ifdef HAVE_HOTSWAP_STORAGE_AS_MAIN
|
||||
check_bootfile(false); /* remember write time and filesize */
|
||||
#endif
|
||||
settings_apply(true);
|
||||
settings_apply_skins();
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -77,7 +77,7 @@ static int reset_settings(void)
|
|||
case YESNO_YES:
|
||||
settings_reset();
|
||||
settings_save();
|
||||
settings_apply();
|
||||
settings_apply(true);
|
||||
settings_apply_skins();
|
||||
break;
|
||||
case YESNO_NO:
|
||||
|
|
|
|||
|
|
@ -96,7 +96,7 @@ static int set_color_func(void* color)
|
|||
res = (int)set_color(&screens[SCREEN_MAIN],str(colors[c].lang_id),
|
||||
colors[c].setting, banned_color);
|
||||
settings_save();
|
||||
settings_apply();
|
||||
settings_apply(false);
|
||||
return res;
|
||||
}
|
||||
|
||||
|
|
@ -109,7 +109,7 @@ static int reset_color(void)
|
|||
global_settings.lst_color = LCD_DEFAULT_FG;
|
||||
|
||||
settings_save();
|
||||
settings_apply();
|
||||
settings_apply(false);
|
||||
return 0;
|
||||
}
|
||||
MENUITEM_FUNCTION(set_bg_col, MENU_FUNC_USEPARAM, ID2P(LANG_BACKGROUND_COLOR),
|
||||
|
|
|
|||
|
|
@ -360,7 +360,7 @@ bool settings_load_config(const char* file, bool apply)
|
|||
settings_save();
|
||||
if (apply)
|
||||
{
|
||||
settings_apply();
|
||||
settings_apply(true);
|
||||
settings_apply_skins();
|
||||
}
|
||||
return true;
|
||||
|
|
@ -741,7 +741,7 @@ void sound_settings_apply(void)
|
|||
}
|
||||
|
||||
|
||||
void settings_apply(void)
|
||||
void settings_apply(bool read_disk)
|
||||
{
|
||||
|
||||
char buf[64];
|
||||
|
|
@ -833,52 +833,54 @@ void settings_apply(void)
|
|||
audiohw_enable_speaker(global_settings.speaker_enabled);
|
||||
#endif
|
||||
|
||||
if (read_disk)
|
||||
{
|
||||
#ifdef HAVE_LCD_BITMAP
|
||||
/* fonts need to be loaded before the WPS */
|
||||
if (global_settings.font_file[0]
|
||||
&& global_settings.font_file[0] != '-') {
|
||||
snprintf(buf, sizeof buf, FONT_DIR "/%s.fnt",
|
||||
global_settings.font_file);
|
||||
if (font_load(NULL, buf) < 0)
|
||||
/* fonts need to be loaded before the WPS */
|
||||
if (global_settings.font_file[0]
|
||||
&& global_settings.font_file[0] != '-') {
|
||||
snprintf(buf, sizeof buf, FONT_DIR "/%s.fnt",
|
||||
global_settings.font_file);
|
||||
if (font_load(NULL, buf) < 0)
|
||||
font_reset(NULL);
|
||||
}
|
||||
else
|
||||
font_reset(NULL);
|
||||
}
|
||||
else
|
||||
font_reset(NULL);
|
||||
#ifdef HAVE_REMOTE_LCD
|
||||
if ( global_settings.remote_font_file[0]
|
||||
&& global_settings.remote_font_file[0] != '-') {
|
||||
snprintf(buf, sizeof buf, FONT_DIR "/%s.fnt",
|
||||
global_settings.remote_font_file);
|
||||
if (font_load_remoteui(buf) < 0)
|
||||
if ( global_settings.remote_font_file[0]
|
||||
&& global_settings.remote_font_file[0] != '-') {
|
||||
snprintf(buf, sizeof buf, FONT_DIR "/%s.fnt",
|
||||
global_settings.remote_font_file);
|
||||
if (font_load_remoteui(buf) < 0)
|
||||
font_load_remoteui(NULL);
|
||||
}
|
||||
else
|
||||
font_load_remoteui(NULL);
|
||||
}
|
||||
else
|
||||
font_load_remoteui(NULL);
|
||||
#endif
|
||||
if ( global_settings.kbd_file[0]) {
|
||||
snprintf(buf, sizeof buf, ROCKBOX_DIR "/%s.kbd",
|
||||
global_settings.kbd_file);
|
||||
load_kbd(buf);
|
||||
}
|
||||
else
|
||||
load_kbd(NULL);
|
||||
if ( global_settings.kbd_file[0]) {
|
||||
snprintf(buf, sizeof buf, ROCKBOX_DIR "/%s.kbd",
|
||||
global_settings.kbd_file);
|
||||
load_kbd(buf);
|
||||
}
|
||||
else
|
||||
load_kbd(NULL);
|
||||
#endif
|
||||
|
||||
if ( global_settings.lang_file[0]) {
|
||||
snprintf(buf, sizeof buf, LANG_DIR "/%s.lng",
|
||||
global_settings.lang_file);
|
||||
lang_core_load(buf);
|
||||
talk_init(); /* use voice of same language */
|
||||
}
|
||||
if ( global_settings.lang_file[0]) {
|
||||
snprintf(buf, sizeof buf, LANG_DIR "/%s.lng",
|
||||
global_settings.lang_file);
|
||||
lang_core_load(buf);
|
||||
talk_init(); /* use voice of same language */
|
||||
}
|
||||
|
||||
/* load the icon set */
|
||||
icons_init();
|
||||
/* load the icon set */
|
||||
icons_init();
|
||||
|
||||
#ifdef HAVE_LCD_COLOR
|
||||
if (global_settings.colors_file[0])
|
||||
read_color_theme_file();
|
||||
if (global_settings.colors_file[0])
|
||||
read_color_theme_file();
|
||||
#endif
|
||||
|
||||
}
|
||||
#ifdef HAVE_LCD_COLOR
|
||||
screens[SCREEN_MAIN].set_foreground(global_settings.fg_color);
|
||||
screens[SCREEN_MAIN].set_background(global_settings.bg_color);
|
||||
|
|
|
|||
|
|
@ -260,7 +260,7 @@ void sound_settings_apply(void);
|
|||
*/
|
||||
void settings_apply_skins(void);
|
||||
|
||||
void settings_apply(void);
|
||||
void settings_apply(bool read_disk);
|
||||
void settings_apply_pm_range(void);
|
||||
void settings_display(void);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue