From eee5423fe10f247f74d69404924edf3a0d54e8cd Mon Sep 17 00:00:00 2001 From: Jonathan Gordon Date: Fri, 29 Jan 2010 07:52:13 +0000 Subject: skin rework (FS#10922) notable changes: - simplify the setting/skin relationship. settings are used as the fallback if it's not specified in the skin - backdrop buffers are now in the skin buffer (which has also increased slightly to accomodate 1 backdrop for each skin and 2 full colour screens for bmps (up for 1.5)) - if no %X is specified in a skin then the backdrop setting will be used. use %Xd to explicitly disable a skin from displaying a backdrop - the base skin can now specify a backdrop. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24366 a1c6a512-1295-4272-9138-f99709370657 --- apps/gui/skin_engine/skin_buffer.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'apps/gui/skin_engine/skin_buffer.c') 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 @@ #include "buffer.h" #include "settings.h" #include "screen_access.h" +#include "skin_engine.h" #include "wps_internals.h" #include "skin_tokens.h" #include "skin_buffer.h" @@ -46,7 +47,7 @@ * items with unknown sizes get allocated from the start (0->) (data) * items with known sizes get allocated from the end (<-buf_size) (tokens) * After loading 2 skins the buffer will look like this: - * |tokens skin1|images skin2|---SPACE---|data skin2|data skin1| + * |tokens skin1|images skin1|tokens s2|images s2|---SPACE---|data skin2|data skin1| * Make sure to never start allocating from the beginning before letting us know * how much was used. and RESPECT THE buf_free RETURN VALUES! * @@ -54,12 +55,12 @@ #ifdef HAVE_LCD_BITMAP -#define MAIN_BUFFER ((LCD_HEIGHT*LCD_WIDTH*LCD_DEPTH/8) \ - + (2*LCD_HEIGHT*LCD_WIDTH/8)) +#define MAIN_BUFFER ((2*LCD_HEIGHT*LCD_WIDTH*LCD_DEPTH/8) \ + + (SKINNABLE_SCREENS_COUNT * LCD_BACKDROP_BYTES)) #if (NB_SCREENS > 1) -#define REMOTE_BUFFER ((LCD_REMOTE_HEIGHT*LCD_REMOTE_WIDTH*LCD_REMOTE_DEPTH/8) \ - + (2*LCD_REMOTE_HEIGHT*LCD_REMOTE_WIDTH/8)) +#define REMOTE_BUFFER (2*(LCD_REMOTE_HEIGHT*LCD_REMOTE_WIDTH*LCD_REMOTE_DEPTH/8) \ + + (SKINNABLE_SCREENS_COUNT * REMOTE_LCD_BACKDROP_BYTES)) #else #define REMOTE_BUFFER 0 #endif -- cgit v1.2.3