summaryrefslogtreecommitdiffstats
path: root/apps/gui/skin_engine
diff options
context:
space:
mode:
Diffstat (limited to 'apps/gui/skin_engine')
-rw-r--r--apps/gui/skin_engine/skin_engine.c12
-rw-r--r--apps/gui/skin_engine/skin_parser.c6
2 files changed, 9 insertions, 9 deletions
diff --git a/apps/gui/skin_engine/skin_engine.c b/apps/gui/skin_engine/skin_engine.c
index 960bbdb313..25baeb2c3c 100644
--- a/apps/gui/skin_engine/skin_engine.c
+++ b/apps/gui/skin_engine/skin_engine.c
@@ -40,18 +40,18 @@
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;
+/* App uses the host malloc to manage the buffer */
+#ifdef APPLICATION
+#define skin_buffer NULL
void theme_init_buffer(void)
{
- skin_buffer = buffer_alloc(SKIN_BUFFER_SIZE);
skins_initialising = false;
}
-#else
-#define skin_buffer NULL
+#else
+static char *skin_buffer = NULL;
void theme_init_buffer(void)
{
+ skin_buffer = buffer_alloc(SKIN_BUFFER_SIZE);
skins_initialising = false;
}
#endif
diff --git a/apps/gui/skin_engine/skin_parser.c b/apps/gui/skin_engine/skin_parser.c
index c0ea3e3ca9..ad3e7e48ce 100644
--- a/apps/gui/skin_engine/skin_parser.c
+++ b/apps/gui/skin_engine/skin_parser.c
@@ -1613,13 +1613,13 @@ bool skin_data_load(enum screen_type screen, struct wps_data *wps_data,
wps_data->backdrop_id = -1;
#endif
/* parse the skin source */
-#if ((CONFIG_PLATFORM&PLATFORM_HOSTED) == 0)
+#ifndef APPLICATION
skin_buffer_save_position();
#endif
wps_data->tree = skin_parse(wps_buffer, skin_element_callback, wps_data);
if (!wps_data->tree) {
skin_data_reset(wps_data);
-#if ((CONFIG_PLATFORM&PLATFORM_HOSTED) == 0)
+#ifndef APPLICATION
skin_buffer_restore_position();
#endif
return false;
@@ -1643,7 +1643,7 @@ bool skin_data_load(enum screen_type screen, struct wps_data *wps_data,
!skin_load_fonts(wps_data))
{
skin_data_reset(wps_data);
-#if ((CONFIG_PLATFORM&PLATFORM_HOSTED) == 0)
+#ifndef APPLICATION
skin_buffer_restore_position();
#endif
return false;