summaryrefslogtreecommitdiff
path: root/apps/gui/wps_parser.c
diff options
context:
space:
mode:
Diffstat (limited to 'apps/gui/wps_parser.c')
-rw-r--r--apps/gui/wps_parser.c14
1 files changed, 12 insertions, 2 deletions
diff --git a/apps/gui/wps_parser.c b/apps/gui/wps_parser.c
index 7211e6c86a..bd599509ae 100644
--- a/apps/gui/wps_parser.c
+++ b/apps/gui/wps_parser.c
@@ -1163,6 +1163,7 @@ struct touchaction {char* s; int action;};
1163static struct touchaction touchactions[] = { 1163static struct touchaction touchactions[] = {
1164 {"play", ACTION_WPS_PLAY }, {"stop", ACTION_WPS_STOP }, 1164 {"play", ACTION_WPS_PLAY }, {"stop", ACTION_WPS_STOP },
1165 {"prev", ACTION_WPS_SKIPPREV }, {"next", ACTION_WPS_SKIPNEXT }, 1165 {"prev", ACTION_WPS_SKIPPREV }, {"next", ACTION_WPS_SKIPNEXT },
1166 {"ffwd", ACTION_WPS_SEEKFWD }, {"rwd", ACTION_WPS_SEEKBACK },
1166 {"menu", ACTION_WPS_MENU }, {"browse", ACTION_WPS_BROWSE }, 1167 {"menu", ACTION_WPS_MENU }, {"browse", ACTION_WPS_BROWSE },
1167 {"shuffle", ACTION_TOUCH_SHUFFLE }, {"repmode", ACTION_TOUCH_REPMODE }, 1168 {"shuffle", ACTION_TOUCH_SHUFFLE }, {"repmode", ACTION_TOUCH_REPMODE },
1168 {"quickscreen", ACTION_WPS_QUICKSCREEN },{"contextmenu", ACTION_WPS_CONTEXT }, 1169 {"quickscreen", ACTION_WPS_QUICKSCREEN },{"contextmenu", ACTION_WPS_CONTEXT },
@@ -1178,13 +1179,14 @@ static int parse_touchregion(const char *wps_bufptr,
1178 int x,y,w,h; 1179 int x,y,w,h;
1179 1180
1180 /* format: %T|x|y|width|height|action| 1181 /* format: %T|x|y|width|height|action|
1182 * if action starts with & the area must be held to happen
1181 * action is one of: 1183 * action is one of:
1182 * play - play/pause playback 1184 * play - play/pause playback
1183 * stop - stop playback, exit the wps 1185 * stop - stop playback, exit the wps
1184 * prev - prev track 1186 * prev - prev track
1185 * next - next track 1187 * next - next track
1186 * ffwd 1188 * ffwd - seek forward
1187 * rwd 1189 * rwd - seek backwards
1188 * menu - go back to the main menu 1190 * menu - go back to the main menu
1189 * browse - go back to the file/db browser 1191 * browse - go back to the file/db browser
1190 * shuffle - toggle shuffle mode 1192 * shuffle - toggle shuffle mode
@@ -1213,6 +1215,14 @@ static int parse_touchregion(const char *wps_bufptr,
1213 region->height = h; 1215 region->height = h;
1214 region->wvp = &wps_data->viewports[wps_data->num_viewports]; 1216 region->wvp = &wps_data->viewports[wps_data->num_viewports];
1215 i = 0; 1217 i = 0;
1218 if (*action == '&')
1219 {
1220 action++;
1221 region->repeat = true;
1222 }
1223 else
1224 region->repeat = false;
1225
1216 while ((region->action == ACTION_NONE) && 1226 while ((region->action == ACTION_NONE) &&
1217 (i < sizeof(touchactions)/sizeof(*touchactions))) 1227 (i < sizeof(touchactions)/sizeof(*touchactions)))
1218 { 1228 {