forked from len0rd/rockbox
skinengine: Load the fms the first time the fm screen is entered instead of on boot to save some ram
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31038 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
0ca4b38b1b
commit
f78bcb165f
1 changed files with 10 additions and 5 deletions
|
|
@ -52,11 +52,12 @@ static struct gui_skin_helper {
|
|||
int (*preproccess)(enum screen_type screen, struct wps_data *data);
|
||||
int (*postproccess)(enum screen_type screen, struct wps_data *data);
|
||||
char* (*default_skin)(enum screen_type screen);
|
||||
bool load_on_boot;
|
||||
} skin_helpers[SKINNABLE_SCREENS_COUNT] = {
|
||||
[CUSTOM_STATUSBAR] = { sb_preproccess, sb_postproccess, sb_create_from_settings },
|
||||
[WPS] = { NULL, NULL, wps_default_skin },
|
||||
[CUSTOM_STATUSBAR] = { sb_preproccess, sb_postproccess, sb_create_from_settings, true },
|
||||
[WPS] = { NULL, NULL, wps_default_skin, true },
|
||||
#if CONFIG_TUNER
|
||||
[FM_SCREEN] = { NULL, NULL, default_radio_skin }
|
||||
[FM_SCREEN] = { NULL, NULL, default_radio_skin, false }
|
||||
#endif
|
||||
};
|
||||
|
||||
|
|
@ -155,6 +156,7 @@ void settings_apply_skins(void)
|
|||
}
|
||||
gui_skin_reset(&skins[i][j]);
|
||||
skins[i][j].gui_wps.display = &screens[j];
|
||||
if (skin_helpers[i].load_on_boot)
|
||||
skin_get_gwps(i, j);
|
||||
}
|
||||
}
|
||||
|
|
@ -162,7 +164,6 @@ void settings_apply_skins(void)
|
|||
first_run = false;
|
||||
viewportmanager_theme_changed(THEME_STATUSBAR);
|
||||
#ifdef HAVE_BACKDROP_IMAGE
|
||||
skin_backdrops_preload(); /* should maybe check the retval here... */
|
||||
FOR_NB_SCREENS(i)
|
||||
skin_backdrop_show(sb_get_backdrop(i));
|
||||
#endif
|
||||
|
|
@ -191,6 +192,10 @@ void skin_load(enum skinnable_screens skin, enum screen_type screen,
|
|||
skins[skin][screen].needs_full_update = true;
|
||||
if (skin_helpers[skin].postproccess)
|
||||
skin_helpers[skin].postproccess(screen, &skins[skin][screen].data);
|
||||
#ifdef HAVE_BACKDROP_IMAGE
|
||||
if (loaded)
|
||||
skin_backdrops_preload();
|
||||
#endif
|
||||
}
|
||||
|
||||
static char* get_skin_filename(char *buf, size_t buf_size,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue