summaryrefslogtreecommitdiff
path: root/apps/gui/skin_engine
diff options
context:
space:
mode:
authorJonathan Gordon <rockbox@jdgordon.info>2011-03-22 09:41:11 +0000
committerJonathan Gordon <rockbox@jdgordon.info>2011-03-22 09:41:11 +0000
commitf4e152bdefe4eaad148e47afc8d69dff5c060762 (patch)
treeb2b3c0867daac00a5c853176639b19d6e75e48d0 /apps/gui/skin_engine
parent98881fd8225b24cbcab69d18062e2b7918c5de51 (diff)
Make repeat mode/shuffle work in the sbs also
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29632 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/gui/skin_engine')
-rw-r--r--apps/gui/skin_engine/skin_touchsupport.c24
1 files changed, 24 insertions, 0 deletions
diff --git a/apps/gui/skin_engine/skin_touchsupport.c b/apps/gui/skin_engine/skin_touchsupport.c
index c16d223af3..e1a7d0688e 100644
--- a/apps/gui/skin_engine/skin_touchsupport.c
+++ b/apps/gui/skin_engine/skin_touchsupport.c
@@ -32,6 +32,7 @@
#include "lang.h"
#include "splash.h"
#include "playlist.h"
+#include "dsp.h"
/** Disarms all touchregions. */
void skin_disarm_touchregions(struct wps_data *data)
@@ -237,6 +238,29 @@ int skin_get_touchaction(struct wps_data *data, int* edge_offset,
returncode = ACTION_REDRAW;
}
break;
+ case ACTION_TOUCH_SHUFFLE: /* toggle shuffle mode */
+ {
+ global_settings.playlist_shuffle =
+ !global_settings.playlist_shuffle;
+#if CONFIG_CODEC == SWCODEC
+ dsp_set_replaygain();
+#endif
+ if (global_settings.playlist_shuffle)
+ playlist_randomise(NULL, current_tick, true);
+ else
+ playlist_sort(NULL, true);
+ returncode = ACTION_REDRAW;
+ }
+ break;
+ case ACTION_TOUCH_REPMODE: /* cycle the repeat mode setting */
+ {
+ const struct settings_list *rep_setting =
+ find_setting(&global_settings.repeat_mode, NULL);
+ option_select_next_val(rep_setting, false, true);
+ audio_flush_and_reload_tracks();
+ returncode = ACTION_REDRAW;
+ }
+ break;
}
return returncode;
}