diff options
author | Nicolas Pennequin <nicolas.pennequin@free.fr> | 2007-04-05 02:44:01 +0000 |
---|---|---|
committer | Nicolas Pennequin <nicolas.pennequin@free.fr> | 2007-04-05 02:44:01 +0000 |
commit | 29e18caacff0fe07736c6652ec75267fce6c9aff (patch) | |
tree | 5b081711866989d18f7d9774864a9b716e6b1180 /apps | |
parent | 2aad3c05f3936c3ecad6b2f67da83a44fcc2a06a (diff) | |
download | rockbox-29e18caacff0fe07736c6652ec75267fce6c9aff.tar.gz rockbox-29e18caacff0fe07736c6652ec75267fce6c9aff.zip |
Allow subline timeout values to be changed dynamically in the WPS (e.g. by using conditionals).
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@13026 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps')
-rw-r--r-- | apps/gui/gwps-common.c | 9 | ||||
-rw-r--r-- | apps/gui/wps_parser.c | 7 |
2 files changed, 9 insertions, 7 deletions
diff --git a/apps/gui/gwps-common.c b/apps/gui/gwps-common.c index 7e38a08615..6307fed157 100644 --- a/apps/gui/gwps-common.c +++ b/apps/gui/gwps-common.c | |||
@@ -1396,6 +1396,10 @@ static bool get_line(struct gui_wps *gwps, | |||
1396 | i = find_conditional_end(data, i); | 1396 | i = find_conditional_end(data, i); |
1397 | break; | 1397 | break; |
1398 | 1398 | ||
1399 | case WPS_TOKEN_SUBLINE_TIMEOUT: | ||
1400 | data->time_mult[line][subline] = data->tokens[i].value.i; | ||
1401 | break; | ||
1402 | |||
1399 | #ifdef HAVE_LCD_BITMAP | 1403 | #ifdef HAVE_LCD_BITMAP |
1400 | case WPS_TOKEN_IMAGE_PRELOAD_DISPLAY: | 1404 | case WPS_TOKEN_IMAGE_PRELOAD_DISPLAY: |
1401 | { | 1405 | { |
@@ -1759,9 +1763,14 @@ bool gui_wps_refresh(struct gui_wps *gwps, | |||
1759 | /* reset to first subline if refresh all flag is set */ | 1763 | /* reset to first subline if refresh all flag is set */ |
1760 | if (refresh_mode == WPS_REFRESH_ALL) | 1764 | if (refresh_mode == WPS_REFRESH_ALL) |
1761 | { | 1765 | { |
1766 | int j; | ||
1762 | for (i = 0; i < data->num_lines; i++) | 1767 | for (i = 0; i < data->num_lines; i++) |
1763 | { | 1768 | { |
1764 | data->curr_subline[i] = SUBLINE_RESET; | 1769 | data->curr_subline[i] = SUBLINE_RESET; |
1770 | for (j = 0; j < data->num_sublines[i]; j++) | ||
1771 | { | ||
1772 | data->time_mult[i][j] = DEFAULT_SUBLINE_TIME_MULTIPLIER; | ||
1773 | } | ||
1765 | } | 1774 | } |
1766 | } | 1775 | } |
1767 | 1776 | ||
diff --git a/apps/gui/wps_parser.c b/apps/gui/wps_parser.c index 07a1df64ac..321286fd05 100644 --- a/apps/gui/wps_parser.c +++ b/apps/gui/wps_parser.c | |||
@@ -493,13 +493,6 @@ static int parse_subline_timeout(const char *wps_token, struct wps_data *wps_dat | |||
493 | if (have_tenth == false) | 493 | if (have_tenth == false) |
494 | val *= 10; | 494 | val *= 10; |
495 | 495 | ||
496 | if (val > 0) | ||
497 | { | ||
498 | int line = wps_data->num_lines; | ||
499 | int subline = wps_data->num_sublines[line]; | ||
500 | wps_data->time_mult[line][subline] = val; | ||
501 | } | ||
502 | |||
503 | wps_data->tokens[wps_data->num_tokens].value.i = val; | 496 | wps_data->tokens[wps_data->num_tokens].value.i = val; |
504 | return skip; | 497 | return skip; |
505 | } | 498 | } |