mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-11-09 21:22:39 -05:00
Remove is_fading from the global WPS state
Turns out it was never assigned and always false. Change-Id: I8cd9118682e7a0785c262d4c0594f8f51412c18b
This commit is contained in:
parent
33a47e4a49
commit
13da1ba785
5 changed files with 5 additions and 20 deletions
|
|
@ -1044,8 +1044,7 @@ const char *get_token_value(struct gui_wps *gwps,
|
||||||
int mode = 1; /* stop */
|
int mode = 1; /* stop */
|
||||||
if (status == STATUS_PLAY)
|
if (status == STATUS_PLAY)
|
||||||
mode = 2; /* play */
|
mode = 2; /* play */
|
||||||
if (state->is_fading ||
|
if (status == STATUS_PAUSE && !status_get_ffmode())
|
||||||
(status == STATUS_PAUSE && !status_get_ffmode()))
|
|
||||||
mode = 3; /* pause */
|
mode = 3; /* pause */
|
||||||
else
|
else
|
||||||
{ /* ff / rwd */
|
{ /* ff / rwd */
|
||||||
|
|
|
||||||
|
|
@ -403,7 +403,6 @@ struct wps_state
|
||||||
struct mp3entry* nid3;
|
struct mp3entry* nid3;
|
||||||
int ff_rewind_count;
|
int ff_rewind_count;
|
||||||
bool paused;
|
bool paused;
|
||||||
bool is_fading;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
/* change the ff/rew-status
|
/* change the ff/rew-status
|
||||||
|
|
|
||||||
|
|
@ -1070,11 +1070,3 @@ static void wps_state_init(void)
|
||||||
add_event(PLAYBACK_EVENT_TRACK_SKIP, track_info_callback);
|
add_event(PLAYBACK_EVENT_TRACK_SKIP, track_info_callback);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
#ifdef IPOD_ACCESSORY_PROTOCOL
|
|
||||||
bool is_wps_fading(void)
|
|
||||||
{
|
|
||||||
return skin_get_global_state()->is_fading;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
|
||||||
|
|
@ -30,11 +30,6 @@ void pause_action(bool updatewps);
|
||||||
void unpause_action(bool updatewps);
|
void unpause_action(bool updatewps);
|
||||||
void wps_do_playpause(bool updatewps);
|
void wps_do_playpause(bool updatewps);
|
||||||
|
|
||||||
#ifdef IPOD_ACCESSORY_PROTOCOL
|
|
||||||
/* whether the wps is fading the volume due to pausing/stopping */
|
|
||||||
bool is_wps_fading(void);
|
|
||||||
#endif /* IPOD_ACCESSORY_PROTOCOL */
|
|
||||||
|
|
||||||
/* in milliseconds */
|
/* in milliseconds */
|
||||||
#define DEFAULT_SKIP_THRESH 3000l
|
#define DEFAULT_SKIP_THRESH 3000l
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1218,7 +1218,7 @@ void iap_handlepkt_mode4(const unsigned int len, const unsigned char *buf)
|
||||||
{
|
{
|
||||||
memcpy(cur_dbrecord, buf + 3, 5);
|
memcpy(cur_dbrecord, buf + 3, 5);
|
||||||
|
|
||||||
int paused = (is_wps_fading() || (audio_status() & AUDIO_STATUS_PAUSE));
|
int paused = !!(audio_status() & AUDIO_STATUS_PAUSE);
|
||||||
uint32_t index;
|
uint32_t index;
|
||||||
uint32_t trackcount;
|
uint32_t trackcount;
|
||||||
index = get_u32(&cur_dbrecord[1]);
|
index = get_u32(&cur_dbrecord[1]);
|
||||||
|
|
@ -2003,7 +2003,7 @@ void iap_handlepkt_mode4(const unsigned int len, const unsigned char *buf)
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
{
|
{
|
||||||
int paused = (is_wps_fading() || (audio_status() & AUDIO_STATUS_PAUSE));
|
int paused = !!(audio_status() & AUDIO_STATUS_PAUSE);
|
||||||
uint32_t index;
|
uint32_t index;
|
||||||
uint32_t trackcount;
|
uint32_t trackcount;
|
||||||
index = get_u32(&buf[3]);
|
index = get_u32(&buf[3]);
|
||||||
|
|
@ -2821,7 +2821,7 @@ void iap_handlepkt_mode4(const unsigned int len, const unsigned char *buf)
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
{
|
{
|
||||||
int paused = (is_wps_fading() || (audio_status() & AUDIO_STATUS_PAUSE));
|
int paused = !!(audio_status() & AUDIO_STATUS_PAUSE);
|
||||||
long tracknum = get_u32(&buf[3]);
|
long tracknum = get_u32(&buf[3]);
|
||||||
|
|
||||||
audio_pause();
|
audio_pause();
|
||||||
|
|
@ -2977,7 +2977,7 @@ void iap_handlepkt_mode4(const unsigned int len, const unsigned char *buf)
|
||||||
{
|
{
|
||||||
memcpy(cur_dbrecord, buf + 3, 5);
|
memcpy(cur_dbrecord, buf + 3, 5);
|
||||||
|
|
||||||
int paused = (is_wps_fading() || (audio_status() & AUDIO_STATUS_PAUSE));
|
int paused = !!(audio_status() & AUDIO_STATUS_PAUSE);
|
||||||
unsigned int number_of_playlists = nbr_total_playlists();
|
unsigned int number_of_playlists = nbr_total_playlists();
|
||||||
uint32_t index;
|
uint32_t index;
|
||||||
uint32_t trackcount;
|
uint32_t trackcount;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue