diff options
author | Aidan MacDonald <amachronic@protonmail.com> | 2022-10-02 20:44:27 +0100 |
---|---|---|
committer | Aidan MacDonald <amachronic@protonmail.com> | 2022-10-18 12:56:28 +0100 |
commit | 13da1ba785b1f06bacae06da422ac2cf2ea5eb76 (patch) | |
tree | 0f6b10e05ae7edbf2220651217779e699802be21 | |
parent | 33a47e4a494764802f63b4b456dbd113df250b37 (diff) | |
download | rockbox-13da1ba785b1f06bacae06da422ac2cf2ea5eb76.tar.gz rockbox-13da1ba785b1f06bacae06da422ac2cf2ea5eb76.zip |
Remove is_fading from the global WPS state
Turns out it was never assigned and always false.
Change-Id: I8cd9118682e7a0785c262d4c0594f8f51412c18b
-rw-r--r-- | apps/gui/skin_engine/skin_tokens.c | 3 | ||||
-rw-r--r-- | apps/gui/skin_engine/wps_internals.h | 1 | ||||
-rw-r--r-- | apps/gui/wps.c | 8 | ||||
-rw-r--r-- | apps/gui/wps.h | 5 | ||||
-rw-r--r-- | apps/iap/iap-lingo4.c | 8 |
5 files changed, 5 insertions, 20 deletions
diff --git a/apps/gui/skin_engine/skin_tokens.c b/apps/gui/skin_engine/skin_tokens.c index 27022b87d1..0101a5e01e 100644 --- a/apps/gui/skin_engine/skin_tokens.c +++ b/apps/gui/skin_engine/skin_tokens.c | |||
@@ -1044,8 +1044,7 @@ const char *get_token_value(struct gui_wps *gwps, | |||
1044 | int mode = 1; /* stop */ | 1044 | int mode = 1; /* stop */ |
1045 | if (status == STATUS_PLAY) | 1045 | if (status == STATUS_PLAY) |
1046 | mode = 2; /* play */ | 1046 | mode = 2; /* play */ |
1047 | if (state->is_fading || | 1047 | if (status == STATUS_PAUSE && !status_get_ffmode()) |
1048 | (status == STATUS_PAUSE && !status_get_ffmode())) | ||
1049 | mode = 3; /* pause */ | 1048 | mode = 3; /* pause */ |
1050 | else | 1049 | else |
1051 | { /* ff / rwd */ | 1050 | { /* ff / rwd */ |
diff --git a/apps/gui/skin_engine/wps_internals.h b/apps/gui/skin_engine/wps_internals.h index 4db304297b..2aedff752b 100644 --- a/apps/gui/skin_engine/wps_internals.h +++ b/apps/gui/skin_engine/wps_internals.h | |||
@@ -403,7 +403,6 @@ struct wps_state | |||
403 | struct mp3entry* nid3; | 403 | struct mp3entry* nid3; |
404 | int ff_rewind_count; | 404 | int ff_rewind_count; |
405 | bool paused; | 405 | bool paused; |
406 | bool is_fading; | ||
407 | }; | 406 | }; |
408 | 407 | ||
409 | /* change the ff/rew-status | 408 | /* change the ff/rew-status |
diff --git a/apps/gui/wps.c b/apps/gui/wps.c index b1700459cc..53ece62e9c 100644 --- a/apps/gui/wps.c +++ b/apps/gui/wps.c | |||
@@ -1070,11 +1070,3 @@ static void wps_state_init(void) | |||
1070 | add_event(PLAYBACK_EVENT_TRACK_SKIP, track_info_callback); | 1070 | add_event(PLAYBACK_EVENT_TRACK_SKIP, track_info_callback); |
1071 | #endif | 1071 | #endif |
1072 | } | 1072 | } |
1073 | |||
1074 | |||
1075 | #ifdef IPOD_ACCESSORY_PROTOCOL | ||
1076 | bool is_wps_fading(void) | ||
1077 | { | ||
1078 | return skin_get_global_state()->is_fading; | ||
1079 | } | ||
1080 | #endif | ||
diff --git a/apps/gui/wps.h b/apps/gui/wps.h index 4abd0c4fe4..75c8138d35 100644 --- a/apps/gui/wps.h +++ b/apps/gui/wps.h | |||
@@ -30,11 +30,6 @@ void pause_action(bool updatewps); | |||
30 | void unpause_action(bool updatewps); | 30 | void unpause_action(bool updatewps); |
31 | void wps_do_playpause(bool updatewps); | 31 | void wps_do_playpause(bool updatewps); |
32 | 32 | ||
33 | #ifdef IPOD_ACCESSORY_PROTOCOL | ||
34 | /* whether the wps is fading the volume due to pausing/stopping */ | ||
35 | bool is_wps_fading(void); | ||
36 | #endif /* IPOD_ACCESSORY_PROTOCOL */ | ||
37 | |||
38 | /* in milliseconds */ | 33 | /* in milliseconds */ |
39 | #define DEFAULT_SKIP_THRESH 3000l | 34 | #define DEFAULT_SKIP_THRESH 3000l |
40 | 35 | ||
diff --git a/apps/iap/iap-lingo4.c b/apps/iap/iap-lingo4.c index 4ec5c462a1..abb13eac02 100644 --- a/apps/iap/iap-lingo4.c +++ b/apps/iap/iap-lingo4.c | |||
@@ -1218,7 +1218,7 @@ void iap_handlepkt_mode4(const unsigned int len, const unsigned char *buf) | |||
1218 | { | 1218 | { |
1219 | memcpy(cur_dbrecord, buf + 3, 5); | 1219 | memcpy(cur_dbrecord, buf + 3, 5); |
1220 | 1220 | ||
1221 | int paused = (is_wps_fading() || (audio_status() & AUDIO_STATUS_PAUSE)); | 1221 | int paused = !!(audio_status() & AUDIO_STATUS_PAUSE); |
1222 | uint32_t index; | 1222 | uint32_t index; |
1223 | uint32_t trackcount; | 1223 | uint32_t trackcount; |
1224 | index = get_u32(&cur_dbrecord[1]); | 1224 | index = get_u32(&cur_dbrecord[1]); |
@@ -2003,7 +2003,7 @@ void iap_handlepkt_mode4(const unsigned int len, const unsigned char *buf) | |||
2003 | * | 2003 | * |
2004 | */ | 2004 | */ |
2005 | { | 2005 | { |
2006 | int paused = (is_wps_fading() || (audio_status() & AUDIO_STATUS_PAUSE)); | 2006 | int paused = !!(audio_status() & AUDIO_STATUS_PAUSE); |
2007 | uint32_t index; | 2007 | uint32_t index; |
2008 | uint32_t trackcount; | 2008 | uint32_t trackcount; |
2009 | index = get_u32(&buf[3]); | 2009 | index = get_u32(&buf[3]); |
@@ -2821,7 +2821,7 @@ void iap_handlepkt_mode4(const unsigned int len, const unsigned char *buf) | |||
2821 | * | 2821 | * |
2822 | */ | 2822 | */ |
2823 | { | 2823 | { |
2824 | int paused = (is_wps_fading() || (audio_status() & AUDIO_STATUS_PAUSE)); | 2824 | int paused = !!(audio_status() & AUDIO_STATUS_PAUSE); |
2825 | long tracknum = get_u32(&buf[3]); | 2825 | long tracknum = get_u32(&buf[3]); |
2826 | 2826 | ||
2827 | audio_pause(); | 2827 | audio_pause(); |
@@ -2977,7 +2977,7 @@ void iap_handlepkt_mode4(const unsigned int len, const unsigned char *buf) | |||
2977 | { | 2977 | { |
2978 | memcpy(cur_dbrecord, buf + 3, 5); | 2978 | memcpy(cur_dbrecord, buf + 3, 5); |
2979 | 2979 | ||
2980 | int paused = (is_wps_fading() || (audio_status() & AUDIO_STATUS_PAUSE)); | 2980 | int paused = !!(audio_status() & AUDIO_STATUS_PAUSE); |
2981 | unsigned int number_of_playlists = nbr_total_playlists(); | 2981 | unsigned int number_of_playlists = nbr_total_playlists(); |
2982 | uint32_t index; | 2982 | uint32_t index; |
2983 | uint32_t trackcount; | 2983 | uint32_t trackcount; |