Don't load wps data twice when loading from cfg file. Gives a noticable speedup when loading themes with lots of images.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@11184 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
bba9de2368
commit
ec79219f01
1 changed files with 8 additions and 2 deletions
|
@ -1561,13 +1561,19 @@ bool settings_load_config(const char* file)
|
|||
#ifdef HAVE_LCD_COLOR
|
||||
unload_wps_backdrop();
|
||||
#endif
|
||||
if (wps_data_load(gui_wps[0].data, value, true))
|
||||
int fd2;
|
||||
if ((fd2 = open(value, O_RDONLY)) >= 0) {
|
||||
close(fd2);
|
||||
set_file(value, (char *)global_settings.wps_file, MAX_FILENAME);
|
||||
}
|
||||
}
|
||||
#if defined(HAVE_REMOTE_LCD) && (NB_SCREENS > 1)
|
||||
else if (!strcasecmp(name, "rwps")) {
|
||||
if (wps_data_load(gui_wps[1].data, value, true))
|
||||
int fd2;
|
||||
if ((fd2 = open(value, O_RDONLY)) >= 0) {
|
||||
close(fd2);
|
||||
set_file(value, (char *)global_settings.rwps_file, MAX_FILENAME);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
else if (!strcasecmp(name, "lang")) {
|
||||
|
|
Loading…
Reference in a new issue