diff options
Diffstat (limited to 'apps/gui/skin_engine/skin_touchsupport.c')
-rw-r--r-- | apps/gui/skin_engine/skin_touchsupport.c | 53 |
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 @@ | |||
28 | #include "option_select.h" | 28 | #include "option_select.h" |
29 | #include "sound.h" | 29 | #include "sound.h" |
30 | #include "settings_list.h" | 30 | #include "settings_list.h" |
31 | 31 | #include "wps.h" | |
32 | #include "lang.h" | ||
33 | #include "splash.h" | ||
34 | #include "playlist.h" | ||
32 | 35 | ||
33 | /** Disarms all touchregions. */ | 36 | /** Disarms all touchregions. */ |
34 | void skin_disarm_touchregions(struct wps_data *data) | 37 | void skin_disarm_touchregions(struct wps_data *data) |
@@ -125,8 +128,56 @@ int skin_get_touchaction(struct wps_data *data, int* edge_offset, | |||
125 | 128 | ||
126 | if (returncode != ACTION_NONE) | 129 | if (returncode != ACTION_NONE) |
127 | { | 130 | { |
131 | if (global_settings.party_mode) | ||
132 | { | ||
133 | switch (returncode) | ||
134 | { | ||
135 | case ACTION_WPS_PLAY: | ||
136 | case ACTION_WPS_SKIPPREV: | ||
137 | case ACTION_WPS_SKIPNEXT: | ||
138 | case ACTION_WPS_STOP: | ||
139 | returncode = ACTION_NONE; | ||
140 | break; | ||
141 | default: | ||
142 | break; | ||
143 | } | ||
144 | } | ||
128 | switch (returncode) | 145 | switch (returncode) |
129 | { | 146 | { |
147 | case ACTION_WPS_PLAY: | ||
148 | if (!audio_status()) | ||
149 | { | ||
150 | if ( global_status.resume_index != -1 ) | ||
151 | { | ||
152 | if (playlist_resume() != -1) | ||
153 | { | ||
154 | playlist_start(global_status.resume_index, | ||
155 | global_status.resume_offset); | ||
156 | } | ||
157 | } | ||
158 | else | ||
159 | { | ||
160 | splash(HZ*2, ID2P(LANG_NOTHING_TO_RESUME)); | ||
161 | } | ||
162 | } | ||
163 | else | ||
164 | { | ||
165 | wps_do_playpause(false); | ||
166 | } | ||
167 | returncode = ACTION_REDRAW; | ||
168 | break; | ||
169 | case ACTION_WPS_SKIPPREV: | ||
170 | audio_prev(); | ||
171 | returncode = ACTION_REDRAW; | ||
172 | break; | ||
173 | case ACTION_WPS_SKIPNEXT: | ||
174 | audio_next(); | ||
175 | returncode = ACTION_REDRAW; | ||
176 | break; | ||
177 | case ACTION_WPS_STOP: | ||
178 | audio_stop(); | ||
179 | returncode = ACTION_REDRAW; | ||
180 | break; | ||
130 | case ACTION_SETTINGS_INC: | 181 | case ACTION_SETTINGS_INC: |
131 | case ACTION_SETTINGS_DEC: | 182 | case ACTION_SETTINGS_DEC: |
132 | { | 183 | { |