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) |
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 @@ #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; } 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) restore = true; } break; -#ifdef HAVE_TOUCHSCREEN - 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); - } - 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(); - } - break; -#endif /* HAVE_TOUCHSCREEN */ /* this case is used by the softlock feature * it requests a full update here */ case ACTION_REDRAW: |