diff options
| author | Dominik Riebeling <Dominik.Riebeling@gmail.com> | 2006-10-11 08:58:23 +0000 |
|---|---|---|
| committer | Dominik Riebeling <Dominik.Riebeling@gmail.com> | 2006-10-11 08:58:23 +0000 |
| commit | ec79219f012ba64617510ac7ba822d1b8b0f0c26 (patch) | |
| tree | 8ef89494d4c78e7a5f99e36448904492b7a02635 /apps | |
| parent | bba9de2368047bae36c11295dc1e4cfe2715ce95 (diff) | |
| download | rockbox-ec79219f012ba64617510ac7ba822d1b8b0f0c26.zip rockbox-ec79219f012ba64617510ac7ba822d1b8b0f0c26.tar.gz rockbox-ec79219f012ba64617510ac7ba822d1b8b0f0c26.tar.bz2 rockbox-ec79219f012ba64617510ac7ba822d1b8b0f0c26.tar.xz | |
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
Diffstat (limited to 'apps')
| -rw-r--r-- | apps/settings.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/apps/settings.c b/apps/settings.c index 2e64042..da7ecb4 100644 --- a/apps/settings.c +++ b/apps/settings.c @@ -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")) { |