diff options
| author | Jonathan Gordon <rockbox@jdgordon.info> | 2008-10-11 12:20:09 +0000 |
|---|---|---|
| committer | Jonathan Gordon <rockbox@jdgordon.info> | 2008-10-11 12:20:09 +0000 |
| commit | 85600e629bf6a6a0583b0b7cb601431f05c61f1d (patch) | |
| tree | 39722bc619d903efc6b3a0126d98984f82159add /apps/gui/wps_parser.c | |
| parent | 1a549d49f77da1fdf028bfe9b9669ece055069a4 (diff) | |
| download | rockbox-85600e629bf6a6a0583b0b7cb601431f05c61f1d.zip rockbox-85600e629bf6a6a0583b0b7cb601431f05c61f1d.tar.gz rockbox-85600e629bf6a6a0583b0b7cb601431f05c61f1d.tar.bz2 rockbox-85600e629bf6a6a0583b0b7cb601431f05c61f1d.tar.xz | |
update the %mv wps tag to let you specify how long it should wait after being released to go back to false.
e.g %mv2 will stay true for 2 seconds or %mv3.5 is 3.5 seconds (same as the %t syntax)... if no number is specified it defaults to 1 second
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@18769 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/gui/wps_parser.c')
| -rw-r--r-- | apps/gui/wps_parser.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/apps/gui/wps_parser.c b/apps/gui/wps_parser.c index eff65ef..96e8d66 100644 --- a/apps/gui/wps_parser.c +++ b/apps/gui/wps_parser.c @@ -131,7 +131,7 @@ struct wps_tag { }; /* prototypes of all special parse functions : */ -static int parse_subline_timeout(const char *wps_bufptr, +static int parse_timeout(const char *wps_bufptr, struct wps_token *token, struct wps_data *wps_data); static int parse_progressbar(const char *wps_bufptr, struct wps_token *token, struct wps_data *wps_data); @@ -279,7 +279,8 @@ static const struct wps_tag all_tags[] = { { WPS_TOKEN_REPEAT_MODE, "mm", WPS_REFRESH_DYNAMIC, NULL }, { WPS_TOKEN_PLAYBACK_STATUS, "mp", WPS_REFRESH_DYNAMIC, NULL }, - { WPS_TOKEN_BUTTON_VOLUME, "mv", WPS_REFRESH_DYNAMIC, NULL }, + { WPS_TOKEN_BUTTON_VOLUME, "mv", WPS_REFRESH_DYNAMIC, + parse_timeout }, #ifdef HAVE_LCD_BITMAP { WPS_TOKEN_PEAKMETER, "pm", WPS_REFRESH_PEAK_METER, NULL }, @@ -314,7 +315,7 @@ static const struct wps_tag all_tags[] = { #endif { WPS_NO_TOKEN, "s", WPS_REFRESH_SCROLL, NULL }, - { WPS_TOKEN_SUBLINE_TIMEOUT, "t", 0, parse_subline_timeout }, + { WPS_TOKEN_SUBLINE_TIMEOUT, "t", 0, parse_timeout }, #ifdef HAVE_LCD_BITMAP { WPS_NO_TOKEN, "we", 0, parse_statusbar_enable }, @@ -766,9 +767,9 @@ static int parse_dir_level(const char *wps_bufptr, return 1; } -static int parse_subline_timeout(const char *wps_bufptr, - struct wps_token *token, - struct wps_data *wps_data) +static int parse_timeout(const char *wps_bufptr, + struct wps_token *token, + struct wps_data *wps_data) { int skip = 0; int val = 0; @@ -1110,7 +1111,6 @@ static int parse_albumart_conditional(const char *wps_bufptr, }; #endif /* HAVE_ALBUMART */ - /* Parse a generic token from the given string. Return the length read */ static int parse_token(const char *wps_bufptr, struct wps_data *wps_data) { |