forked from len0rd/rockbox
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
This commit is contained in:
parent
2aad3c05f3
commit
29e18caacf
2 changed files with 9 additions and 7 deletions
|
|
@ -1396,6 +1396,10 @@ static bool get_line(struct gui_wps *gwps,
|
||||||
i = find_conditional_end(data, i);
|
i = find_conditional_end(data, i);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case WPS_TOKEN_SUBLINE_TIMEOUT:
|
||||||
|
data->time_mult[line][subline] = data->tokens[i].value.i;
|
||||||
|
break;
|
||||||
|
|
||||||
#ifdef HAVE_LCD_BITMAP
|
#ifdef HAVE_LCD_BITMAP
|
||||||
case WPS_TOKEN_IMAGE_PRELOAD_DISPLAY:
|
case WPS_TOKEN_IMAGE_PRELOAD_DISPLAY:
|
||||||
{
|
{
|
||||||
|
|
@ -1759,9 +1763,14 @@ bool gui_wps_refresh(struct gui_wps *gwps,
|
||||||
/* reset to first subline if refresh all flag is set */
|
/* reset to first subline if refresh all flag is set */
|
||||||
if (refresh_mode == WPS_REFRESH_ALL)
|
if (refresh_mode == WPS_REFRESH_ALL)
|
||||||
{
|
{
|
||||||
|
int j;
|
||||||
for (i = 0; i < data->num_lines; i++)
|
for (i = 0; i < data->num_lines; i++)
|
||||||
{
|
{
|
||||||
data->curr_subline[i] = SUBLINE_RESET;
|
data->curr_subline[i] = SUBLINE_RESET;
|
||||||
|
for (j = 0; j < data->num_sublines[i]; j++)
|
||||||
|
{
|
||||||
|
data->time_mult[i][j] = DEFAULT_SUBLINE_TIME_MULTIPLIER;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -493,13 +493,6 @@ static int parse_subline_timeout(const char *wps_token, struct wps_data *wps_dat
|
||||||
if (have_tenth == false)
|
if (have_tenth == false)
|
||||||
val *= 10;
|
val *= 10;
|
||||||
|
|
||||||
if (val > 0)
|
|
||||||
{
|
|
||||||
int line = wps_data->num_lines;
|
|
||||||
int subline = wps_data->num_sublines[line];
|
|
||||||
wps_data->time_mult[line][subline] = val;
|
|
||||||
}
|
|
||||||
|
|
||||||
wps_data->tokens[wps_data->num_tokens].value.i = val;
|
wps_data->tokens[wps_data->num_tokens].value.i = val;
|
||||||
return skip;
|
return skip;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue