1
0
Fork 0
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:
Magnus Holmgren 2010-03-06 12:14:12 +00:00
parent 8050d47a4e
commit a14f4acb0c
6 changed files with 49 additions and 45 deletions

View file

@ -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);
}

View file

@ -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();
}

View file

@ -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:

View file

@ -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),

View file

@ -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,6 +833,8 @@ 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]
@ -878,7 +880,7 @@ void settings_apply(void)
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);

View file

@ -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);