diff options
author | Jonathan Gordon <rockbox@jdgordon.info> | 2009-08-16 18:23:00 +0000 |
---|---|---|
committer | Jonathan Gordon <rockbox@jdgordon.info> | 2009-08-16 18:23:00 +0000 |
commit | 18a8e529b5d14413dce83cdb9103f3426db10708 (patch) | |
tree | 5ac9e53a987b6a48c92281b32aba9b6ca9bcab08 /apps/gui/skin_engine/wps_debug.c | |
parent | eefe832785407c387e71aba476091e805eecc3f4 (diff) | |
download | rockbox-18a8e529b5d14413dce83cdb9103f3426db10708.tar.gz rockbox-18a8e529b5d14413dce83cdb9103f3426db10708.zip |
more wps->skin engine work..
start redoing memory management in the skins to use a single larger buffer instead of lots of arrays for things like images and progressbars.
This commit removes the limit on the amount of progressbars allowed on the screen, still 1 per viewport, but unlimited otherwise(!)
Also a larger buffer for remote targets, same size for non-remote targets but very easy to make it bigger (technically removed the 52(?) image limit in skins, except still limited to 1 char identifiers)
Unlimited "string" tokens now (limit was 1024 which was rediculously wasteful)
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@22350 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/gui/skin_engine/wps_debug.c')
-rw-r--r-- | apps/gui/skin_engine/wps_debug.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/apps/gui/skin_engine/wps_debug.c b/apps/gui/skin_engine/wps_debug.c index 02a2cc3de9..c4a73a7cfb 100644 --- a/apps/gui/skin_engine/wps_debug.c +++ b/apps/gui/skin_engine/wps_debug.c | |||
@@ -23,6 +23,7 @@ | |||
23 | 23 | ||
24 | #include <stdio.h> | 24 | #include <stdio.h> |
25 | #include <string.h> | 25 | #include <string.h> |
26 | #include "wps.h" | ||
26 | #include "wps_internals.h" | 27 | #include "wps_internals.h" |
27 | #ifdef __PCTOOL__ | 28 | #ifdef __PCTOOL__ |
28 | #ifdef WPSEDITOR | 29 | #ifdef WPSEDITOR |
@@ -548,15 +549,18 @@ static void print_line_info(struct wps_data *data) | |||
548 | DEBUGF("\n"); | 549 | DEBUGF("\n"); |
549 | } | 550 | } |
550 | } | 551 | } |
551 | 552 | #if 0 | |
553 | /* NOTE: this is probaly not even needed anymore */ | ||
552 | static void print_wps_strings(struct wps_data *data) | 554 | static void print_wps_strings(struct wps_data *data) |
553 | { | 555 | { |
554 | int i, len, total_len = 0, buf_used = 0; | 556 | int i, len, total_len = 0, buf_used = 0; |
555 | 557 | ||
556 | if (wps_verbose_level > 1) DEBUGF("Strings:\n"); | 558 | if (wps_verbose_level > 1) DEBUGF("Strings:\n"); |
557 | for (i = 0; i < data->num_strings; i++) | 559 | struct skin_token_list *strings = data->strings; |
560 | while (strings) | ||
558 | { | 561 | { |
559 | len = strlen(data->strings[i]); | 562 | char* str = (char*)strings->token->value.data; |
563 | len = strlen(str); | ||
560 | total_len += len; | 564 | total_len += len; |
561 | buf_used += len + 1; | 565 | buf_used += len + 1; |
562 | if (wps_verbose_level > 1) | 566 | if (wps_verbose_level > 1) |
@@ -575,6 +579,7 @@ static void print_wps_strings(struct wps_data *data) | |||
575 | } | 579 | } |
576 | } | 580 | } |
577 | #endif | 581 | #endif |
582 | #endif | ||
578 | 583 | ||
579 | void print_debug_info(struct wps_data *data, enum wps_parse_error fail, int line) | 584 | void print_debug_info(struct wps_data *data, enum wps_parse_error fail, int line) |
580 | { | 585 | { |
@@ -582,7 +587,7 @@ void print_debug_info(struct wps_data *data, enum wps_parse_error fail, int line | |||
582 | if (debug_wps && wps_verbose_level) | 587 | if (debug_wps && wps_verbose_level) |
583 | { | 588 | { |
584 | dump_wps_tokens(data); | 589 | dump_wps_tokens(data); |
585 | print_wps_strings(data); | 590 | /* print_wps_strings(data); */ |
586 | print_line_info(data); | 591 | print_line_info(data); |
587 | } | 592 | } |
588 | #endif /* SIMULATOR */ | 593 | #endif /* SIMULATOR */ |