summaryrefslogtreecommitdiffstats
path: root/apps/gui/skin_engine/skin_engine.c
diff options
context:
space:
mode:
authorJonathan Gordon <rockbox@jdgordon.info>2011-11-15 14:11:08 +0000
committerJonathan Gordon <rockbox@jdgordon.info>2011-11-15 14:11:08 +0000
commit9e07ef2b0adb8fca7e5a9e516397e533653f8836 (patch)
tree0a283550421917e52ee04068b84a464976f0c4f2 /apps/gui/skin_engine/skin_engine.c
parent101693fd3047fb64e766580e80635a424fa25c4d (diff)
downloadrockbox-9e07ef2b0adb8fca7e5a9e516397e533653f8836.tar.gz
rockbox-9e07ef2b0adb8fca7e5a9e516397e533653f8836.zip
Use buflib for all skin engine allocations.
Massive thanks to Michael Chicoine and other testers for finding the early bugs. This removes all skin memory limitations git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30991 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/gui/skin_engine/skin_engine.c')
-rw-r--r--apps/gui/skin_engine/skin_engine.c26
1 files changed, 13 insertions, 13 deletions
diff --git a/apps/gui/skin_engine/skin_engine.c b/apps/gui/skin_engine/skin_engine.c
index bd875fe9e4..75862faab0 100644
--- a/apps/gui/skin_engine/skin_engine.c
+++ b/apps/gui/skin_engine/skin_engine.c
@@ -41,19 +41,10 @@
static bool skins_initialising = true;
/* App uses the host malloc to manage the buffer */
-#ifdef APPLICATION
-#define skin_buffer NULL
void theme_init_buffer(void)
{
skins_initialising = false;
}
-#else
-static char skin_buffer[SKIN_BUFFER_SIZE];
-void theme_init_buffer(void)
-{
- skins_initialising = false;
-}
-#endif
void skin_data_free_buflib_allocs(struct wps_data *wps_data);
char* wps_default_skin(enum screen_type screen);
@@ -95,8 +86,20 @@ void gui_sync_skin_init(void)
skins[j][i].gui_wps.display = &screens[i];
memset(skins[j][i].gui_wps.data, 0, sizeof(struct wps_data));
skins[j][i].data.wps_loaded = false;
+ skins[j][i].data.buflib_handle = -1;
+ skins[j][i].data.tree = -1;
+#ifdef HAVE_TOUCHSCREEN
+ skins[j][i].data.touchregions = -1;
+#endif
+#ifdef HAVE_SKIN_VARIABLES
+ skins[j][i].data.skinvars = -1;
+#endif
+#ifdef HAVE_LCD_BITMAP
+ skins[j][i].data.font_ids = -1;
+ skins[j][i].data.images = -1;
+#endif
#ifdef HAVE_ALBUMART
- skins[j][i].data.albumart = NULL;
+ skins[j][i].data.albumart = -1;
skins[j][i].data.playback_aa_slot = -1;
#endif
}
@@ -113,8 +116,6 @@ void skin_unload_all(void)
skin_data_free_buflib_allocs(&skins[j][i].data);
}
- skin_buffer_init(skin_buffer, SKIN_BUFFER_SIZE);
-
#ifdef HAVE_LCD_BITMAP
skin_backdrop_init();
#endif
@@ -245,7 +246,6 @@ struct gui_wps *skin_get_gwps(enum skinnable_screens skin, enum screen_type scre
cpu_boost(false);
loading_a_sbs = false;
}
-
return &skins[skin][screen].gui_wps;
}