diff options
author | Thomas Martitz <kugel@rockbox.org> | 2010-11-05 19:12:23 +0000 |
---|---|---|
committer | Thomas Martitz <kugel@rockbox.org> | 2010-11-05 19:12:23 +0000 |
commit | 5411e14c57185b2b33fbfbb7ff7fec8ca2700551 (patch) | |
tree | 41149a1100c3ba708e0065cd7409c2e14ac976b2 /apps/gui/skin_engine/skin_engine.c | |
parent | d98f2929e9c07505056d846d1d309f1e16694ce7 (diff) | |
download | rockbox-5411e14c57185b2b33fbfbb7ff7fec8ca2700551.tar.gz rockbox-5411e14c57185b2b33fbfbb7ff7fec8ca2700551.zip |
Undo the part of r28480 that caused the simulator to also use host malloc.
We want simulators to simulate target code where possible, that includes memory constraints and memory allocation schemes. It also removed the sim's ability to show the theme's ram usage.
Use malloc only in application builds.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28498 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 | 12 |
1 files changed, 6 insertions, 6 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 @@ | |||
40 | 40 | ||
41 | static bool skins_initialising = true; | 41 | static bool skins_initialising = true; |
42 | 42 | ||
43 | /* Hosted platforms use the host malloc to manage the buffer */ | 43 | /* App uses the host malloc to manage the buffer */ |
44 | #if ((CONFIG_PLATFORM&PLATFORM_HOSTED) == 0) | 44 | #ifdef APPLICATION |
45 | static char *skin_buffer = NULL; | 45 | #define skin_buffer NULL |
46 | void theme_init_buffer(void) | 46 | void theme_init_buffer(void) |
47 | { | 47 | { |
48 | skin_buffer = buffer_alloc(SKIN_BUFFER_SIZE); | ||
49 | skins_initialising = false; | 48 | skins_initialising = false; |
50 | } | 49 | } |
51 | #else | 50 | #else |
52 | #define skin_buffer NULL | 51 | static char *skin_buffer = NULL; |
53 | void theme_init_buffer(void) | 52 | void theme_init_buffer(void) |
54 | { | 53 | { |
54 | skin_buffer = buffer_alloc(SKIN_BUFFER_SIZE); | ||
55 | skins_initialising = false; | 55 | skins_initialising = false; |
56 | } | 56 | } |
57 | #endif | 57 | #endif |