mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-11-09 21:22:39 -05:00
skin_engine minor refactoring struct alignment No Functional Changes
Move some elements around to save 720 bytes in the skin engine with cabbie saves some code manipulating the skin_helpers arrays in skin_engine eliminate conditionals checking for pre/post process functions using a dummy fn(), consolidate pre/post process into a single function adding a bool preprocess to indicate stage Change-Id: Id2df4706b73e9025c7300be135dc02e135e587fe
This commit is contained in:
parent
f1010005b0
commit
68d4fd0e5b
6 changed files with 49 additions and 43 deletions
|
|
@ -76,16 +76,15 @@ enum themable_icons sb_get_icon(enum screen_type screen)
|
|||
return sbs_has_title[screen] ? sbs_icon[screen] : Icon_NOICON + 2;
|
||||
}
|
||||
|
||||
int sb_preproccess(enum screen_type screen, struct wps_data *data)
|
||||
{
|
||||
(void)data;
|
||||
sbs_loaded[screen] = false;
|
||||
sbs_has_title[screen] = false;
|
||||
viewportmanager_theme_enable(screen, false, NULL);
|
||||
return 1;
|
||||
}
|
||||
int sb_postproccess(enum screen_type screen, struct wps_data *data)
|
||||
void sb_process(enum screen_type screen, struct wps_data *data, bool preprocess)
|
||||
{
|
||||
if (preprocess)
|
||||
{
|
||||
sbs_loaded[screen] = false;
|
||||
sbs_has_title[screen] = false;
|
||||
viewportmanager_theme_enable(screen, false, NULL);
|
||||
return;
|
||||
}
|
||||
if (data->wps_loaded)
|
||||
{
|
||||
/* hide the sb's default viewport because it has nasty effect with stuff
|
||||
|
|
@ -100,7 +99,7 @@ int sb_postproccess(enum screen_type screen, struct wps_data *data)
|
|||
{
|
||||
if (!next_vp)
|
||||
{ /* no second viewport, let parsing fail */
|
||||
return 0;
|
||||
return;
|
||||
}
|
||||
/* hide this viewport, forever */
|
||||
vp->hidden_flags = VP_NEVER_VISIBLE;
|
||||
|
|
@ -109,7 +108,6 @@ int sb_postproccess(enum screen_type screen, struct wps_data *data)
|
|||
sbs_loaded[screen] = true;
|
||||
}
|
||||
viewportmanager_theme_undo(screen, false);
|
||||
return 1;
|
||||
}
|
||||
|
||||
static OFFSETTYPE(char*) infovp_label[NB_SCREENS];
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue