diff options
author | Jonathan Gordon <rockbox@jdgordon.info> | 2010-11-04 10:15:33 +0000 |
---|---|---|
committer | Jonathan Gordon <rockbox@jdgordon.info> | 2010-11-04 10:15:33 +0000 |
commit | 97857324c32f929c396814ba268e39a865a6fa42 (patch) | |
tree | ffb911b3fac2e01f95956e540807583b92e65134 /apps/gui/skin_engine/skin_engine.c | |
parent | 72964f2571cce19524c45254d3b71639dd07def3 (diff) | |
download | rockbox-97857324c32f929c396814ba268e39a865a6fa42.tar.gz rockbox-97857324c32f929c396814ba268e39a865a6fa42.zip |
RaaA: Use the host's malloc() for the skin engine.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28480 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/gui/skin_engine/skin_engine.c')
-rw-r--r-- | apps/gui/skin_engine/skin_engine.c | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/apps/gui/skin_engine/skin_engine.c b/apps/gui/skin_engine/skin_engine.c index 8bf165812a..960bbdb313 100644 --- a/apps/gui/skin_engine/skin_engine.c +++ b/apps/gui/skin_engine/skin_engine.c @@ -38,11 +38,23 @@ #include "skin_buffer.h" #include "statusbar-skinned.h" +static bool skins_initialising = true; + +/* Hosted platforms use the host malloc to manage the buffer */ +#if ((CONFIG_PLATFORM&PLATFORM_HOSTED) == 0) static char *skin_buffer = NULL; void theme_init_buffer(void) { skin_buffer = buffer_alloc(SKIN_BUFFER_SIZE); + skins_initialising = false; } +#else +#define skin_buffer NULL +void theme_init_buffer(void) +{ + skins_initialising = false; +} +#endif void settings_apply_skins(void) { @@ -149,7 +161,7 @@ struct gui_wps *skin_get_gwps(enum skinnable_screens skin, enum screen_type scre { case CUSTOM_STATUSBAR: #ifdef HAVE_LCD_BITMAP - if (skin_buffer == NULL) + if (skins_initialising) { /* still loading, buffers not initialised yet, * viewport manager calls into the sbs code, not really |