diff options
Diffstat (limited to 'apps/gui/skin_engine/skin_buffer.c')
-rw-r--r-- | apps/gui/skin_engine/skin_buffer.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/apps/gui/skin_engine/skin_buffer.c b/apps/gui/skin_engine/skin_buffer.c index e647fc3f1d..a15ad10bee 100644 --- a/apps/gui/skin_engine/skin_buffer.c +++ b/apps/gui/skin_engine/skin_buffer.c | |||
@@ -27,6 +27,7 @@ | |||
27 | #include "buffer.h" | 27 | #include "buffer.h" |
28 | #include "settings.h" | 28 | #include "settings.h" |
29 | #include "screen_access.h" | 29 | #include "screen_access.h" |
30 | #include "skin_engine.h" | ||
30 | #include "wps_internals.h" | 31 | #include "wps_internals.h" |
31 | #include "skin_tokens.h" | 32 | #include "skin_tokens.h" |
32 | #include "skin_buffer.h" | 33 | #include "skin_buffer.h" |
@@ -46,7 +47,7 @@ | |||
46 | * items with unknown sizes get allocated from the start (0->) (data) | 47 | * items with unknown sizes get allocated from the start (0->) (data) |
47 | * items with known sizes get allocated from the end (<-buf_size) (tokens) | 48 | * items with known sizes get allocated from the end (<-buf_size) (tokens) |
48 | * After loading 2 skins the buffer will look like this: | 49 | * After loading 2 skins the buffer will look like this: |
49 | * |tokens skin1|images skin2|---SPACE---|data skin2|data skin1| | 50 | * |tokens skin1|images skin1|tokens s2|images s2|---SPACE---|data skin2|data skin1| |
50 | * Make sure to never start allocating from the beginning before letting us know | 51 | * Make sure to never start allocating from the beginning before letting us know |
51 | * how much was used. and RESPECT THE buf_free RETURN VALUES! | 52 | * how much was used. and RESPECT THE buf_free RETURN VALUES! |
52 | * | 53 | * |
@@ -54,12 +55,12 @@ | |||
54 | 55 | ||
55 | 56 | ||
56 | #ifdef HAVE_LCD_BITMAP | 57 | #ifdef HAVE_LCD_BITMAP |
57 | #define MAIN_BUFFER ((LCD_HEIGHT*LCD_WIDTH*LCD_DEPTH/8) \ | 58 | #define MAIN_BUFFER ((2*LCD_HEIGHT*LCD_WIDTH*LCD_DEPTH/8) \ |
58 | + (2*LCD_HEIGHT*LCD_WIDTH/8)) | 59 | + (SKINNABLE_SCREENS_COUNT * LCD_BACKDROP_BYTES)) |
59 | 60 | ||
60 | #if (NB_SCREENS > 1) | 61 | #if (NB_SCREENS > 1) |
61 | #define REMOTE_BUFFER ((LCD_REMOTE_HEIGHT*LCD_REMOTE_WIDTH*LCD_REMOTE_DEPTH/8) \ | 62 | #define REMOTE_BUFFER (2*(LCD_REMOTE_HEIGHT*LCD_REMOTE_WIDTH*LCD_REMOTE_DEPTH/8) \ |
62 | + (2*LCD_REMOTE_HEIGHT*LCD_REMOTE_WIDTH/8)) | 63 | + (SKINNABLE_SCREENS_COUNT * REMOTE_LCD_BACKDROP_BYTES)) |
63 | #else | 64 | #else |
64 | #define REMOTE_BUFFER 0 | 65 | #define REMOTE_BUFFER 0 |
65 | #endif | 66 | #endif |