diff options
author | Jonathan Gordon <rockbox@jdgordon.info> | 2011-03-22 09:41:11 +0000 |
---|---|---|
committer | Jonathan Gordon <rockbox@jdgordon.info> | 2011-03-22 09:41:11 +0000 |
commit | f4e152bdefe4eaad148e47afc8d69dff5c060762 (patch) | |
tree | b2b3c0867daac00a5c853176639b19d6e75e48d0 | |
parent | 98881fd8225b24cbcab69d18062e2b7918c5de51 (diff) | |
download | rockbox-f4e152bdefe4eaad148e47afc8d69dff5c060762.tar.gz rockbox-f4e152bdefe4eaad148e47afc8d69dff5c060762.zip |
Make repeat mode/shuffle work in the sbs also
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29632 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r-- | apps/gui/skin_engine/skin_touchsupport.c | 24 | ||||
-rw-r--r-- | apps/gui/wps.c | 23 |
2 files changed, 24 insertions, 23 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 @@ | |||
32 | #include "lang.h" | 32 | #include "lang.h" |
33 | #include "splash.h" | 33 | #include "splash.h" |
34 | #include "playlist.h" | 34 | #include "playlist.h" |
35 | #include "dsp.h" | ||
35 | 36 | ||
36 | /** Disarms all touchregions. */ | 37 | /** Disarms all touchregions. */ |
37 | void skin_disarm_touchregions(struct wps_data *data) | 38 | void skin_disarm_touchregions(struct wps_data *data) |
@@ -237,6 +238,29 @@ int skin_get_touchaction(struct wps_data *data, int* edge_offset, | |||
237 | returncode = ACTION_REDRAW; | 238 | returncode = ACTION_REDRAW; |
238 | } | 239 | } |
239 | break; | 240 | break; |
241 | case ACTION_TOUCH_SHUFFLE: /* toggle shuffle mode */ | ||
242 | { | ||
243 | global_settings.playlist_shuffle = | ||
244 | !global_settings.playlist_shuffle; | ||
245 | #if CONFIG_CODEC == SWCODEC | ||
246 | dsp_set_replaygain(); | ||
247 | #endif | ||
248 | if (global_settings.playlist_shuffle) | ||
249 | playlist_randomise(NULL, current_tick, true); | ||
250 | else | ||
251 | playlist_sort(NULL, true); | ||
252 | returncode = ACTION_REDRAW; | ||
253 | } | ||
254 | break; | ||
255 | case ACTION_TOUCH_REPMODE: /* cycle the repeat mode setting */ | ||
256 | { | ||
257 | const struct settings_list *rep_setting = | ||
258 | find_setting(&global_settings.repeat_mode, NULL); | ||
259 | option_select_next_val(rep_setting, false, true); | ||
260 | audio_flush_and_reload_tracks(); | ||
261 | returncode = ACTION_REDRAW; | ||
262 | } | ||
263 | break; | ||
240 | } | 264 | } |
241 | return returncode; | 265 | return returncode; |
242 | } | 266 | } |
diff --git a/apps/gui/wps.c b/apps/gui/wps.c index 473f0a4d75..fc91b9abb2 100644 --- a/apps/gui/wps.c +++ b/apps/gui/wps.c | |||
@@ -1009,29 +1009,6 @@ long gui_wps_show(void) | |||
1009 | restore = true; | 1009 | restore = true; |
1010 | } | 1010 | } |
1011 | break; | 1011 | break; |
1012 | #ifdef HAVE_TOUCHSCREEN | ||
1013 | case ACTION_TOUCH_SHUFFLE: /* toggle shuffle mode */ | ||
1014 | { | ||
1015 | global_settings.playlist_shuffle = | ||
1016 | !global_settings.playlist_shuffle; | ||
1017 | #if CONFIG_CODEC == SWCODEC | ||
1018 | dsp_set_replaygain(); | ||
1019 | #endif | ||
1020 | if (global_settings.playlist_shuffle) | ||
1021 | playlist_randomise(NULL, current_tick, true); | ||
1022 | else | ||
1023 | playlist_sort(NULL, true); | ||
1024 | } | ||
1025 | break; | ||
1026 | case ACTION_TOUCH_REPMODE: /* cycle the repeat mode setting */ | ||
1027 | { | ||
1028 | const struct settings_list *rep_setting = | ||
1029 | find_setting(&global_settings.repeat_mode, NULL); | ||
1030 | option_select_next_val(rep_setting, false, true); | ||
1031 | audio_flush_and_reload_tracks(); | ||
1032 | } | ||
1033 | break; | ||
1034 | #endif /* HAVE_TOUCHSCREEN */ | ||
1035 | /* this case is used by the softlock feature | 1012 | /* this case is used by the softlock feature |
1036 | * it requests a full update here */ | 1013 | * it requests a full update here */ |
1037 | case ACTION_REDRAW: | 1014 | case ACTION_REDRAW: |