diff options
Diffstat (limited to 'apps')
-rw-r--r-- | apps/gui/wps.c | 8 | ||||
-rw-r--r-- | apps/gui/wps.h | 21 | ||||
-rw-r--r-- | apps/iap.c | 10 |
3 files changed, 27 insertions, 12 deletions
diff --git a/apps/gui/wps.c b/apps/gui/wps.c index 447c1d6b00..d62507e0b0 100644 --- a/apps/gui/wps.c +++ b/apps/gui/wps.c | |||
@@ -1232,3 +1232,11 @@ bool wps_uses_albumart(int *width, int *height) | |||
1232 | return false; | 1232 | return false; |
1233 | } | 1233 | } |
1234 | #endif | 1234 | #endif |
1235 | |||
1236 | |||
1237 | #ifdef IPOD_ACCESSORY_PROTOCOL | ||
1238 | int wps_get_ff_rewind_count(void) | ||
1239 | { | ||
1240 | return wps_state.ff_rewind_count; | ||
1241 | } | ||
1242 | #endif | ||
diff --git a/apps/gui/wps.h b/apps/gui/wps.h index b8cb7d2ffa..f2f44859ca 100644 --- a/apps/gui/wps.h +++ b/apps/gui/wps.h | |||
@@ -18,13 +18,17 @@ | |||
18 | * KIND, either express or implied. | 18 | * KIND, either express or implied. |
19 | * | 19 | * |
20 | ****************************************************************************/ | 20 | ****************************************************************************/ |
21 | #ifndef _MUSICSCREEN_H_ | 21 | #ifndef _WPS_H_ |
22 | #define _MUSICSCREEN_H_ | 22 | #define _WPS_H_ |
23 | #include <stdbool.h> | 23 | #include <stdbool.h> |
24 | #include "screen_access.h" | ||
24 | 25 | ||
25 | long gui_wps_show(void); | 26 | long gui_wps_show(void); |
26 | 27 | ||
27 | 28 | /* wrapper for the wps to load the skin (.wps/.rwps) files */ | |
29 | void wps_data_load(enum screen_type, const char *, bool); | ||
30 | void wps_data_init(enum screen_type); | ||
31 | |||
28 | void gui_sync_wps_init(void); | 32 | void gui_sync_wps_init(void); |
29 | 33 | ||
30 | /* fades the volume, e.g. on pause or stop */ | 34 | /* fades the volume, e.g. on pause or stop */ |
@@ -35,9 +39,6 @@ void display_keylock_text(bool locked); | |||
35 | 39 | ||
36 | bool is_wps_fading(void); | 40 | bool is_wps_fading(void); |
37 | 41 | ||
38 | /* wrapper for the wps to load the skin (.wps/.rwps) files */ | ||
39 | void wps_data_load(enum screen_type, const char *, bool); | ||
40 | void wps_data_init(enum screen_type); | ||
41 | 42 | ||
42 | #ifdef HAVE_ALBUMART | 43 | #ifdef HAVE_ALBUMART |
43 | /* | 44 | /* |
@@ -47,4 +48,10 @@ void wps_data_init(enum screen_type); | |||
47 | */ | 48 | */ |
48 | bool wps_uses_albumart(int*, int*); | 49 | bool wps_uses_albumart(int*, int*); |
49 | #endif | 50 | #endif |
50 | #endif | 51 | |
52 | #ifdef IPOD_ACCESSORY_PROTOCOL | ||
53 | /* return length of the current ff or rewin action, IAP needs this */ | ||
54 | int wps_get_ff_rewind_count(void); | ||
55 | #endif /* IPOD_ACCESSORY_PROTOCOL */ | ||
56 | |||
57 | #endif /* _WPS_H_ */ | ||
diff --git a/apps/iap.c b/apps/iap.c index 8dfef9516f..1d351ab1ea 100644 --- a/apps/iap.c +++ b/apps/iap.c | |||
@@ -36,7 +36,7 @@ | |||
36 | #include "audio.h" | 36 | #include "audio.h" |
37 | #include "settings.h" | 37 | #include "settings.h" |
38 | #include "metadata.h" | 38 | #include "metadata.h" |
39 | #include "skin_engine/skin_engine.h" | 39 | #include "wps.h" |
40 | 40 | ||
41 | #include "action.h" | 41 | #include "action.h" |
42 | 42 | ||
@@ -191,7 +191,7 @@ void iap_periodic(void) | |||
191 | unsigned char data[] = {0x04, 0x00, 0x27, 0x04, 0x00, 0x00, 0x00, 0x00}; | 191 | unsigned char data[] = {0x04, 0x00, 0x27, 0x04, 0x00, 0x00, 0x00, 0x00}; |
192 | unsigned long time_elapsed = audio_current_track()->elapsed; | 192 | unsigned long time_elapsed = audio_current_track()->elapsed; |
193 | 193 | ||
194 | time_elapsed += wps_state.ff_rewind_count; | 194 | time_elapsed += wps_get_ff_rewind_count(); |
195 | 195 | ||
196 | data[3] = 0x04; // playing | 196 | data[3] = 0x04; // playing |
197 | 197 | ||
@@ -685,13 +685,13 @@ void iap_handlepkt(void) | |||
685 | /* Jump to track number in current playlist */ | 685 | /* Jump to track number in current playlist */ |
686 | case 0x0037: | 686 | case 0x0037: |
687 | { | 687 | { |
688 | int paused = (is_wps_fading() || (audio_status() & AUDIO_STATUS_PAUSE)); | ||
688 | long tracknum = (signed long)serbuf[4] << 24 | | 689 | long tracknum = (signed long)serbuf[4] << 24 | |
689 | (signed long)serbuf[5] << 16 | | 690 | (signed long)serbuf[5] << 16 | |
690 | (signed long)serbuf[6] << 8 | serbuf[7]; | 691 | (signed long)serbuf[6] << 8 | serbuf[7]; |
691 | if (!wps_state.paused) | 692 | audio_pause(); |
692 | audio_pause(); | ||
693 | audio_skip(tracknum - playlist_next(0)); | 693 | audio_skip(tracknum - playlist_next(0)); |
694 | if (!wps_state.paused) | 694 | if (!paused) |
695 | audio_resume(); | 695 | audio_resume(); |
696 | 696 | ||
697 | /* respond with cmd ok packet */ | 697 | /* respond with cmd ok packet */ |