summaryrefslogtreecommitdiff
path: root/apps/gui
diff options
context:
space:
mode:
Diffstat (limited to 'apps/gui')
-rw-r--r--apps/gui/gwps.c8
-rw-r--r--apps/gui/gwps.h2
-rw-r--r--apps/gui/wps_parser.c2
3 files changed, 10 insertions, 2 deletions
diff --git a/apps/gui/gwps.c b/apps/gui/gwps.c
index eb1437c..154864a 100644
--- a/apps/gui/gwps.c
+++ b/apps/gui/gwps.c
@@ -65,6 +65,7 @@
#include "pcmbuf.h"
#include "option_select.h"
#include "dsp.h"
+#include "playlist_viewer.h"
#define RESTORE_WPS_INSTANTLY 0l
#define RESTORE_WPS_NEXT_SECOND ((long)(HZ+current_tick))
@@ -786,7 +787,12 @@ long gui_wps_show(void)
case SYS_POWEROFF:
default_event_handler(SYS_POWEROFF);
break;
-
+ case ACTION_WPS_VIEW_PLAYLIST:
+ gwps_leave_wps();
+ if (playlist_viewer()) /* true if USB connected */
+ return SYS_USB_CONNECTED;
+ restore = true;
+ break;
default:
if(default_event_handler(button) == SYS_USB_CONNECTED)
return GO_TO_ROOT;
diff --git a/apps/gui/gwps.h b/apps/gui/gwps.h
index ac1cbad..2acde0d 100644
--- a/apps/gui/gwps.h
+++ b/apps/gui/gwps.h
@@ -378,7 +378,7 @@ struct touchregion {
bool repeat; /* requires the area be held for the action */
int action; /* action this button will return */
};
-#define MAX_TOUCHREGIONS 12
+#define MAX_TOUCHREGIONS 15
#endif
/* wps_data
this struct holds all necessary data which describes the
diff --git a/apps/gui/wps_parser.c b/apps/gui/wps_parser.c
index 248269d..fb0b3ac 100644
--- a/apps/gui/wps_parser.c
+++ b/apps/gui/wps_parser.c
@@ -1163,6 +1163,7 @@ static struct touchaction touchactions[] = {
{"menu", ACTION_WPS_MENU }, {"browse", ACTION_WPS_BROWSE },
{"shuffle", ACTION_TOUCH_SHUFFLE }, {"repmode", ACTION_TOUCH_REPMODE },
{"quickscreen", ACTION_WPS_QUICKSCREEN },{"contextmenu", ACTION_WPS_CONTEXT },
+ {"playlist", ACTION_WPS_VIEW_PLAYLIST },
};
static int parse_touchregion(const char *wps_bufptr,
struct wps_token *token, struct wps_data *wps_data)
@@ -1191,6 +1192,7 @@ static int parse_touchregion(const char *wps_bufptr,
* contextmenu - open the context menu
*/
+
if ((wps_data->touchregion_count +1 >= MAX_TOUCHREGIONS) || (*ptr != '|'))
return WPS_ERROR_INVALID_PARAM;
ptr++;