summaryrefslogtreecommitdiffstats
path: root/apps/gui/skin_engine/skin_touchsupport.c
diff options
context:
space:
mode:
authorJonathan Gordon <rockbox@jdgordon.info>2011-03-22 09:31:45 +0000
committerJonathan Gordon <rockbox@jdgordon.info>2011-03-22 09:31:45 +0000
commit98881fd8225b24cbcab69d18062e2b7918c5de51 (patch)
tree4047caf5e473ce9117aeb1e8c67ac5fcfd72e5f5 /apps/gui/skin_engine/skin_touchsupport.c
parentd3c796d20e4bd8e15f18a0dac2e9c4283df5740b (diff)
downloadrockbox-98881fd8225b24cbcab69d18062e2b7918c5de51.tar.gz
rockbox-98881fd8225b24cbcab69d18062e2b7918c5de51.zip
Add some playback controls to the SBS. 2 new touch regions wps_next/wps_prev needed to make it work. 'next' in the sbs changes list selection, 'wps_next' in sbs changes audio tracks. no difference in the wps
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29631 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/gui/skin_engine/skin_touchsupport.c')
-rw-r--r--apps/gui/skin_engine/skin_touchsupport.c53
1 files changed, 52 insertions, 1 deletions
diff --git a/apps/gui/skin_engine/skin_touchsupport.c b/apps/gui/skin_engine/skin_touchsupport.c
index 110e97f997..c16d223af3 100644
--- a/apps/gui/skin_engine/skin_touchsupport.c
+++ b/apps/gui/skin_engine/skin_touchsupport.c
@@ -28,7 +28,10 @@
#include "option_select.h"
#include "sound.h"
#include "settings_list.h"
-
+#include "wps.h"
+#include "lang.h"
+#include "splash.h"
+#include "playlist.h"
/** Disarms all touchregions. */
void skin_disarm_touchregions(struct wps_data *data)
@@ -125,8 +128,56 @@ int skin_get_touchaction(struct wps_data *data, int* edge_offset,
if (returncode != ACTION_NONE)
{
+ if (global_settings.party_mode)
+ {
+ switch (returncode)
+ {
+ case ACTION_WPS_PLAY:
+ case ACTION_WPS_SKIPPREV:
+ case ACTION_WPS_SKIPNEXT:
+ case ACTION_WPS_STOP:
+ returncode = ACTION_NONE;
+ break;
+ default:
+ break;
+ }
+ }
switch (returncode)
{
+ case ACTION_WPS_PLAY:
+ if (!audio_status())
+ {
+ if ( global_status.resume_index != -1 )
+ {
+ if (playlist_resume() != -1)
+ {
+ playlist_start(global_status.resume_index,
+ global_status.resume_offset);
+ }
+ }
+ else
+ {
+ splash(HZ*2, ID2P(LANG_NOTHING_TO_RESUME));
+ }
+ }
+ else
+ {
+ wps_do_playpause(false);
+ }
+ returncode = ACTION_REDRAW;
+ break;
+ case ACTION_WPS_SKIPPREV:
+ audio_prev();
+ returncode = ACTION_REDRAW;
+ break;
+ case ACTION_WPS_SKIPNEXT:
+ audio_next();
+ returncode = ACTION_REDRAW;
+ break;
+ case ACTION_WPS_STOP:
+ audio_stop();
+ returncode = ACTION_REDRAW;
+ break;
case ACTION_SETTINGS_INC:
case ACTION_SETTINGS_DEC:
{