diff options
Diffstat (limited to 'apps/gui')
-rw-r--r-- | apps/gui/gwps.c | 26 | ||||
-rw-r--r-- | apps/gui/wps_parser.c | 5 |
2 files changed, 29 insertions, 2 deletions
diff --git a/apps/gui/gwps.c b/apps/gui/gwps.c index 273f5d8e61..ae9dc453f5 100644 --- a/apps/gui/gwps.c +++ b/apps/gui/gwps.c | |||
@@ -64,6 +64,8 @@ | |||
64 | #include "appevents.h" | 64 | #include "appevents.h" |
65 | #include "viewport.h" | 65 | #include "viewport.h" |
66 | #include "pcmbuf.h" | 66 | #include "pcmbuf.h" |
67 | #include "option_select.h" | ||
68 | #include "dsp.h" | ||
67 | 69 | ||
68 | #define RESTORE_WPS_INSTANTLY 0l | 70 | #define RESTORE_WPS_INSTANTLY 0l |
69 | #define RESTORE_WPS_NEXT_SECOND ((long)(HZ+current_tick)) | 71 | #define RESTORE_WPS_NEXT_SECOND ((long)(HZ+current_tick)) |
@@ -732,7 +734,29 @@ long gui_wps_show(void) | |||
732 | restore = true; | 734 | restore = true; |
733 | } | 735 | } |
734 | break; | 736 | break; |
735 | 737 | #ifdef HAVE_TOUCHSCREEN | |
738 | case ACTION_TOUCH_SHUFFLE: /* toggle shuffle mode */ | ||
739 | { | ||
740 | global_settings.playlist_shuffle = | ||
741 | !global_settings.playlist_shuffle; | ||
742 | #if CONFIG_CODEC == SWCODEC | ||
743 | dsp_set_replaygain(); | ||
744 | #endif | ||
745 | if (global_settings.playlist_shuffle) | ||
746 | playlist_randomise(NULL, current_tick, true); | ||
747 | else | ||
748 | playlist_sort(NULL, true); | ||
749 | } | ||
750 | break; | ||
751 | case ACTION_TOUCH_REPMODE: /* cycle the repeat mode setting */ | ||
752 | { | ||
753 | const struct settings_list *rep_setting = | ||
754 | find_setting(&global_settings.repeat_mode, NULL); | ||
755 | option_select_next_val(rep_setting, false, true); | ||
756 | audio_flush_and_reload_tracks(); | ||
757 | } | ||
758 | break; | ||
759 | #endif /* HAVE_TOUCHSCREEN */ | ||
736 | case ACTION_REDRAW: /* yes are locked, just redraw */ | 760 | case ACTION_REDRAW: /* yes are locked, just redraw */ |
737 | /* fall througgh */ | 761 | /* fall througgh */ |
738 | case ACTION_NONE: /* Timeout, do an partial update */ | 762 | case ACTION_NONE: /* Timeout, do an partial update */ |
diff --git a/apps/gui/wps_parser.c b/apps/gui/wps_parser.c index 290f370fe7..d8155d71df 100644 --- a/apps/gui/wps_parser.c +++ b/apps/gui/wps_parser.c | |||
@@ -1162,7 +1162,8 @@ struct touchaction {char* s; int action;}; | |||
1162 | static struct touchaction touchactions[] = { | 1162 | static struct touchaction touchactions[] = { |
1163 | {"play", ACTION_WPS_PLAY }, {"stop", ACTION_WPS_STOP }, | 1163 | {"play", ACTION_WPS_PLAY }, {"stop", ACTION_WPS_STOP }, |
1164 | {"prev", ACTION_WPS_SKIPPREV }, {"next", ACTION_WPS_SKIPNEXT }, | 1164 | {"prev", ACTION_WPS_SKIPPREV }, {"next", ACTION_WPS_SKIPNEXT }, |
1165 | {"menu", ACTION_WPS_MENU }, {"browse", ACTION_WPS_BROWSE } | 1165 | {"menu", ACTION_WPS_MENU }, {"browse", ACTION_WPS_BROWSE }, |
1166 | {"shuffle", ACTION_TOUCH_SHUFFLE }, {"repmode", ACTION_TOUCH_REPMODE } | ||
1166 | }; | 1167 | }; |
1167 | static int parse_touchregion(const char *wps_bufptr, | 1168 | static int parse_touchregion(const char *wps_bufptr, |
1168 | struct wps_token *token, struct wps_data *wps_data) | 1169 | struct wps_token *token, struct wps_data *wps_data) |
@@ -1184,6 +1185,8 @@ static int parse_touchregion(const char *wps_bufptr, | |||
1184 | * rwd | 1185 | * rwd |
1185 | * menu - go back to the main menu | 1186 | * menu - go back to the main menu |
1186 | * browse - go back to the file/db browser | 1187 | * browse - go back to the file/db browser |
1188 | * shuffle - toggle shuffle mode | ||
1189 | * repmode - cycle the repeat mode | ||
1187 | */ | 1190 | */ |
1188 | 1191 | ||
1189 | if ((wps_data->touchregion_count +1 >= MAX_TOUCHREGIONS) || (*ptr != '|')) | 1192 | if ((wps_data->touchregion_count +1 >= MAX_TOUCHREGIONS) || (*ptr != '|')) |