1
0
Fork 0
forked from len0rd/rockbox

Make repeat mode/shuffle work in the sbs also

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29632 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Jonathan Gordon 2011-03-22 09:41:11 +00:00
parent 98881fd822
commit f4e152bdef
2 changed files with 24 additions and 23 deletions

View file

@ -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;
}

View file

@ -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: