From 0967662b4d1253a8b19e2cce8f5f7d5dab05bb4b Mon Sep 17 00:00:00 2001 From: jdgordon Date: Tue, 22 Mar 2011 09:41:11 +0000 Subject: [PATCH] Make repeat mode/shuffle work in the sbs also git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29632 a1c6a512-1295-4272-9138-f99709370657 --- apps/gui/skin_engine/skin_touchsupport.c | 24 ++++++++++++++++++++++++ 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: -- 2.11.4.GIT