mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-10-13 18:17:39 -04:00
Remove unused 'may_fade' argument of pause/unpause_action
Change-Id: I4eedcf30fa704521e751732a56775c43e9a8bd99
This commit is contained in:
parent
e03bc66594
commit
6e4c866756
3 changed files with 14 additions and 18 deletions
|
@ -115,7 +115,7 @@ static void update_non_static(void)
|
||||||
skin_update(WPS, i, SKIN_REFRESH_NON_STATIC);
|
skin_update(WPS, i, SKIN_REFRESH_NON_STATIC);
|
||||||
}
|
}
|
||||||
|
|
||||||
void pause_action(bool may_fade, bool updatewps)
|
void pause_action(bool updatewps)
|
||||||
{
|
{
|
||||||
/* Do audio first, then update, unless skin were to use its local
|
/* Do audio first, then update, unless skin were to use its local
|
||||||
status in which case, reverse it */
|
status in which case, reverse it */
|
||||||
|
@ -132,11 +132,9 @@ void pause_action(bool may_fade, bool updatewps)
|
||||||
- global_settings.pause_rewind * 1000;
|
- global_settings.pause_rewind * 1000;
|
||||||
audio_ff_rewind(newpos > 0 ? newpos : 0);
|
audio_ff_rewind(newpos > 0 ? newpos : 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
(void)may_fade;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void unpause_action(bool may_fade, bool updatewps)
|
void unpause_action(bool updatewps)
|
||||||
{
|
{
|
||||||
/* Do audio first, then update, unless skin were to use its local
|
/* Do audio first, then update, unless skin were to use its local
|
||||||
status in which case, reverse it */
|
status in which case, reverse it */
|
||||||
|
@ -144,8 +142,6 @@ void unpause_action(bool may_fade, bool updatewps)
|
||||||
|
|
||||||
if (updatewps)
|
if (updatewps)
|
||||||
update_non_static();
|
update_non_static();
|
||||||
|
|
||||||
(void)may_fade;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool update_onvol_change(enum screen_type screen)
|
static bool update_onvol_change(enum screen_type screen)
|
||||||
|
@ -578,12 +574,12 @@ void wps_do_playpause(bool updatewps)
|
||||||
if ( state->paused )
|
if ( state->paused )
|
||||||
{
|
{
|
||||||
state->paused = false;
|
state->paused = false;
|
||||||
unpause_action(true, updatewps);
|
unpause_action(updatewps);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
state->paused = true;
|
state->paused = true;
|
||||||
pause_action(true, updatewps);
|
pause_action(updatewps);
|
||||||
settings_save();
|
settings_save();
|
||||||
#if !defined(HAVE_SW_POWEROFF)
|
#if !defined(HAVE_SW_POWEROFF)
|
||||||
call_storage_idle_notifys(true); /* make sure resume info is saved */
|
call_storage_idle_notifys(true); /* make sure resume info is saved */
|
||||||
|
|
|
@ -26,8 +26,8 @@
|
||||||
long gui_wps_show(void);
|
long gui_wps_show(void);
|
||||||
|
|
||||||
/* fade (if enabled) and pause the audio, optionally rewind a little */
|
/* fade (if enabled) and pause the audio, optionally rewind a little */
|
||||||
void pause_action(bool may_fade, bool updatewps);
|
void pause_action(bool updatewps);
|
||||||
void unpause_action(bool may_fade, bool updatewps);
|
void unpause_action(bool updatewps);
|
||||||
void wps_do_playpause(bool updatewps);
|
void wps_do_playpause(bool updatewps);
|
||||||
|
|
||||||
#ifdef IPOD_ACCESSORY_PROTOCOL
|
#ifdef IPOD_ACCESSORY_PROTOCOL
|
||||||
|
|
16
apps/misc.c
16
apps/misc.c
|
@ -465,7 +465,7 @@ static void car_adapter_mode_processing(bool inserted)
|
||||||
if ((audio_status() & AUDIO_STATUS_PLAY) &&
|
if ((audio_status() & AUDIO_STATUS_PLAY) &&
|
||||||
!(audio_status() & AUDIO_STATUS_PAUSE))
|
!(audio_status() & AUDIO_STATUS_PAUSE))
|
||||||
{
|
{
|
||||||
pause_action(true, true);
|
pause_action(true);
|
||||||
paused_on_unplugged = true;
|
paused_on_unplugged = true;
|
||||||
}
|
}
|
||||||
else if (!waiting_to_resume_play)
|
else if (!waiting_to_resume_play)
|
||||||
|
@ -513,14 +513,14 @@ static void hp_unplug_change(bool inserted)
|
||||||
if ((audio_stat & AUDIO_STATUS_PLAY) &&
|
if ((audio_stat & AUDIO_STATUS_PLAY) &&
|
||||||
headphone_caused_pause &&
|
headphone_caused_pause &&
|
||||||
global_settings.unplug_mode > 1 )
|
global_settings.unplug_mode > 1 )
|
||||||
unpause_action(true, true);
|
unpause_action(true);
|
||||||
headphone_caused_pause = false;
|
headphone_caused_pause = false;
|
||||||
} else {
|
} else {
|
||||||
if ((audio_stat & AUDIO_STATUS_PLAY) &&
|
if ((audio_stat & AUDIO_STATUS_PLAY) &&
|
||||||
!(audio_stat & AUDIO_STATUS_PAUSE))
|
!(audio_stat & AUDIO_STATUS_PAUSE))
|
||||||
{
|
{
|
||||||
headphone_caused_pause = true;
|
headphone_caused_pause = true;
|
||||||
pause_action(false, false);
|
pause_action(false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -552,14 +552,14 @@ static void lo_unplug_change(bool inserted)
|
||||||
if ((audio_stat & AUDIO_STATUS_PLAY) &&
|
if ((audio_stat & AUDIO_STATUS_PLAY) &&
|
||||||
lineout_caused_pause &&
|
lineout_caused_pause &&
|
||||||
global_settings.unplug_mode > 1 )
|
global_settings.unplug_mode > 1 )
|
||||||
unpause_action(true, true);
|
unpause_action(true);
|
||||||
lineout_caused_pause = false;
|
lineout_caused_pause = false;
|
||||||
} else {
|
} else {
|
||||||
if ((audio_stat & AUDIO_STATUS_PLAY) &&
|
if ((audio_stat & AUDIO_STATUS_PLAY) &&
|
||||||
!(audio_stat & AUDIO_STATUS_PAUSE))
|
!(audio_stat & AUDIO_STATUS_PAUSE))
|
||||||
{
|
{
|
||||||
lineout_caused_pause = true;
|
lineout_caused_pause = true;
|
||||||
pause_action(false, false);
|
pause_action(false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -629,7 +629,7 @@ long default_event_handler_ex(long event, void (*callback)(void *), void *parame
|
||||||
return SYS_CHARGER_DISCONNECTED;
|
return SYS_CHARGER_DISCONNECTED;
|
||||||
|
|
||||||
case SYS_CAR_ADAPTER_RESUME:
|
case SYS_CAR_ADAPTER_RESUME:
|
||||||
unpause_action(true, true);
|
unpause_action(true);
|
||||||
return SYS_CAR_ADAPTER_RESUME;
|
return SYS_CAR_ADAPTER_RESUME;
|
||||||
#endif
|
#endif
|
||||||
#ifdef HAVE_HOTSWAP_STORAGE_AS_MAIN
|
#ifdef HAVE_HOTSWAP_STORAGE_AS_MAIN
|
||||||
|
@ -710,9 +710,9 @@ long default_event_handler_ex(long event, void (*callback)(void *), void *parame
|
||||||
if (status & AUDIO_STATUS_PLAY)
|
if (status & AUDIO_STATUS_PLAY)
|
||||||
{
|
{
|
||||||
if (status & AUDIO_STATUS_PAUSE)
|
if (status & AUDIO_STATUS_PAUSE)
|
||||||
unpause_action(true, true);
|
unpause_action(true);
|
||||||
else
|
else
|
||||||
pause_action(true, true);
|
pause_action(true);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
if (playlist_resume() != -1)
|
if (playlist_resume() != -1)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue