From ec79219f012ba64617510ac7ba822d1b8b0f0c26 Mon Sep 17 00:00:00 2001 From: Dominik Riebeling Date: Wed, 11 Oct 2006 08:58:23 +0000 Subject: [PATCH] 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 --- apps/settings.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/apps/settings.c b/apps/settings.c index 2e64042141..da7ecb461d 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")) {