summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Martitz <kugel@rockbox.org>2011-10-16 15:55:12 +0000
committerThomas Martitz <kugel@rockbox.org>2011-10-16 15:55:12 +0000
commit4f3e1d6b487c5a197caf2351e4ed607a056811fd (patch)
tree48a12d0d9dc0a580346b432bb1ab9c74f6c32be3
parent899865a70b0acf16e5e6fa5c6fd2649db1769bc2 (diff)
downloadrockbox-4f3e1d6b487c5a197caf2351e4ed607a056811fd.tar.gz
rockbox-4f3e1d6b487c5a197caf2351e4ed607a056811fd.zip
Fix FS#12320 - need substitute to /.rockbox/skin_buffer_size.txt
Since recent skin engine related commits images aren't stored on the skin buffer anymore. The buffer was decreased accordingly. Now some themes used that buffer more for tokens than images and are now broken. To fix, increase the max token count, while optimizing the two most often allocated structs for size (so no net ram usage increase). git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30762 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r--apps/gui/skin_engine/skin_tokens.h11
-rw-r--r--apps/gui/skin_engine/wps_internals.h2
-rw-r--r--lib/skin_parser/skin_parser.h31
3 files changed, 22 insertions, 22 deletions
diff --git a/apps/gui/skin_engine/skin_tokens.h b/apps/gui/skin_engine/skin_tokens.h
index 9df2137ece..bfca7b7f8d 100644
--- a/apps/gui/skin_engine/skin_tokens.h
+++ b/apps/gui/skin_engine/skin_tokens.h
@@ -26,18 +26,17 @@
26#include "tag_table.h" 26#include "tag_table.h"
27 27
28struct wps_token { 28struct wps_token {
29 enum skin_token_type type; /* enough to store the token type */
30
31 /* Whether the tag (e.g. track name or the album) refers the
32 current or the next song (false=current, true=next) */
33 bool next;
34
35 union { 29 union {
36 char c; 30 char c;
37 unsigned short i; 31 unsigned short i;
38 long l; 32 long l;
39 void* data; 33 void* data;
40 } value; 34 } value;
35
36 enum skin_token_type type; /* enough to store the token type */
37 /* Whether the tag (e.g. track name or the album) refers the
38 current or the next song (false=current, true=next) */
39 bool next;
41}; 40};
42 41
43struct skin_token_list { 42struct skin_token_list {
diff --git a/apps/gui/skin_engine/wps_internals.h b/apps/gui/skin_engine/wps_internals.h
index c16191c41d..ed09ad0938 100644
--- a/apps/gui/skin_engine/wps_internals.h
+++ b/apps/gui/skin_engine/wps_internals.h
@@ -135,7 +135,7 @@ struct align_pos {
135#define WPS_MAX_VIEWPORTS 24 135#define WPS_MAX_VIEWPORTS 24
136#define WPS_MAX_LINES ((LCD_HEIGHT/5+1) * 2) 136#define WPS_MAX_LINES ((LCD_HEIGHT/5+1) * 2)
137#define WPS_MAX_SUBLINES (WPS_MAX_LINES*3) 137#define WPS_MAX_SUBLINES (WPS_MAX_LINES*3)
138#define WPS_MAX_TOKENS 1024 138#define WPS_MAX_TOKENS 1150
139#define WPS_MAX_STRINGS 128 139#define WPS_MAX_STRINGS 128
140#define STRING_BUFFER_SIZE 1024 140#define STRING_BUFFER_SIZE 1024
141#define WPS_MAX_COND_LEVEL 10 141#define WPS_MAX_COND_LEVEL 10
diff --git a/lib/skin_parser/skin_parser.h b/lib/skin_parser/skin_parser.h
index 6f1af25a05..3e0634976c 100644
--- a/lib/skin_parser/skin_parser.h
+++ b/lib/skin_parser/skin_parser.h
@@ -86,15 +86,15 @@ struct skin_tag_parameter
86 86
87}; 87};
88 88
89/* Defines an element of a SKIN file */ 89/* Defines an element of a SKIN file,
90 *
91 * This is allocated a lot, so it's optimized for size */
90struct skin_element 92struct skin_element
91{ 93{
92 /* Defines what type of element it is */ 94 /* Link to the next element */
93 enum skin_element_type type; 95 struct skin_element* next;
94 96 /* Pointer to an array of children */
95 /* The line on which it's defined in the source file */ 97 struct skin_element** children;
96 int line;
97
98 /* Placeholder for element data 98 /* Placeholder for element data
99 * TEXT and COMMENT uses it for the text string 99 * TEXT and COMMENT uses it for the text string
100 * TAG, VIEWPORT, LINE, etc may use it for post parse extra storage 100 * TAG, VIEWPORT, LINE, etc may use it for post parse extra storage
@@ -104,16 +104,17 @@ struct skin_element
104 /* The tag or conditional name */ 104 /* The tag or conditional name */
105 const struct tag_info *tag; 105 const struct tag_info *tag;
106 106
107 /* Pointer to and size of an array of parameters */ 107 /* Pointer to an array of parameters */
108 int params_count;
109 struct skin_tag_parameter* params; 108 struct skin_tag_parameter* params;
110 109
111 /* Pointer to and size of an array of children */ 110 /* Number of elements in the children array */
112 int children_count; 111 short children_count;
113 struct skin_element** children; 112 /* The line on which it's defined in the source file */
114 113 short line;
115 /* Link to the next element */ 114 /* Defines what type of element it is */
116 struct skin_element* next; 115 enum skin_element_type type;
116 /* Number of elements in the params array */
117 char params_count;
117}; 118};
118 119
119enum skin_cb_returnvalue 120enum skin_cb_returnvalue