diff options
-rw-r--r-- | apps/gui/wps.c | 12 | ||||
-rw-r--r-- | apps/gui/wps.h | 4 | ||||
-rw-r--r-- | apps/misc.c | 16 |
3 files changed, 14 insertions, 18 deletions
diff --git a/apps/gui/wps.c b/apps/gui/wps.c index 837621fb44..4d22a83fd6 100644 --- a/apps/gui/wps.c +++ b/apps/gui/wps.c | |||
@@ -115,7 +115,7 @@ static void update_non_static(void) | |||
115 | skin_update(WPS, i, SKIN_REFRESH_NON_STATIC); | 115 | skin_update(WPS, i, SKIN_REFRESH_NON_STATIC); |
116 | } | 116 | } |
117 | 117 | ||
118 | void pause_action(bool may_fade, bool updatewps) | 118 | void pause_action(bool updatewps) |
119 | { | 119 | { |
120 | /* Do audio first, then update, unless skin were to use its local | 120 | /* Do audio first, then update, unless skin were to use its local |
121 | status in which case, reverse it */ | 121 | status in which case, reverse it */ |
@@ -132,11 +132,9 @@ void pause_action(bool may_fade, bool updatewps) | |||
132 | - global_settings.pause_rewind * 1000; | 132 | - global_settings.pause_rewind * 1000; |
133 | audio_ff_rewind(newpos > 0 ? newpos : 0); | 133 | audio_ff_rewind(newpos > 0 ? newpos : 0); |
134 | } | 134 | } |
135 | |||
136 | (void)may_fade; | ||
137 | } | 135 | } |
138 | 136 | ||
139 | void unpause_action(bool may_fade, bool updatewps) | 137 | void unpause_action(bool updatewps) |
140 | { | 138 | { |
141 | /* Do audio first, then update, unless skin were to use its local | 139 | /* Do audio first, then update, unless skin were to use its local |
142 | status in which case, reverse it */ | 140 | status in which case, reverse it */ |
@@ -144,8 +142,6 @@ void unpause_action(bool may_fade, bool updatewps) | |||
144 | 142 | ||
145 | if (updatewps) | 143 | if (updatewps) |
146 | update_non_static(); | 144 | update_non_static(); |
147 | |||
148 | (void)may_fade; | ||
149 | } | 145 | } |
150 | 146 | ||
151 | static bool update_onvol_change(enum screen_type screen) | 147 | static bool update_onvol_change(enum screen_type screen) |
@@ -578,12 +574,12 @@ void wps_do_playpause(bool updatewps) | |||
578 | if ( state->paused ) | 574 | if ( state->paused ) |
579 | { | 575 | { |
580 | state->paused = false; | 576 | state->paused = false; |
581 | unpause_action(true, updatewps); | 577 | unpause_action(updatewps); |
582 | } | 578 | } |
583 | else | 579 | else |
584 | { | 580 | { |
585 | state->paused = true; | 581 | state->paused = true; |
586 | pause_action(true, updatewps); | 582 | pause_action(updatewps); |
587 | settings_save(); | 583 | settings_save(); |
588 | #if !defined(HAVE_SW_POWEROFF) | 584 | #if !defined(HAVE_SW_POWEROFF) |
589 | call_storage_idle_notifys(true); /* make sure resume info is saved */ | 585 | call_storage_idle_notifys(true); /* make sure resume info is saved */ |
diff --git a/apps/gui/wps.h b/apps/gui/wps.h index 88f0ef7c34..4abd0c4fe4 100644 --- a/apps/gui/wps.h +++ b/apps/gui/wps.h | |||
@@ -26,8 +26,8 @@ | |||
26 | long gui_wps_show(void); | 26 | long gui_wps_show(void); |
27 | 27 | ||
28 | /* fade (if enabled) and pause the audio, optionally rewind a little */ | 28 | /* fade (if enabled) and pause the audio, optionally rewind a little */ |
29 | void pause_action(bool may_fade, bool updatewps); | 29 | void pause_action(bool updatewps); |
30 | void unpause_action(bool may_fade, 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 | 33 | #ifdef IPOD_ACCESSORY_PROTOCOL |
diff --git a/apps/misc.c b/apps/misc.c index 63aa3589b2..91f87ad06b 100644 --- a/apps/misc.c +++ b/apps/misc.c | |||
@@ -465,7 +465,7 @@ static void car_adapter_mode_processing(bool inserted) | |||
465 | if ((audio_status() & AUDIO_STATUS_PLAY) && | 465 | if ((audio_status() & AUDIO_STATUS_PLAY) && |
466 | !(audio_status() & AUDIO_STATUS_PAUSE)) | 466 | !(audio_status() & AUDIO_STATUS_PAUSE)) |
467 | { | 467 | { |
468 | pause_action(true, true); | 468 | pause_action(true); |
469 | paused_on_unplugged = true; | 469 | paused_on_unplugged = true; |
470 | } | 470 | } |
471 | else if (!waiting_to_resume_play) | 471 | else if (!waiting_to_resume_play) |
@@ -513,14 +513,14 @@ static void hp_unplug_change(bool inserted) | |||
513 | if ((audio_stat & AUDIO_STATUS_PLAY) && | 513 | if ((audio_stat & AUDIO_STATUS_PLAY) && |
514 | headphone_caused_pause && | 514 | headphone_caused_pause && |
515 | global_settings.unplug_mode > 1 ) | 515 | global_settings.unplug_mode > 1 ) |
516 | unpause_action(true, true); | 516 | unpause_action(true); |
517 | headphone_caused_pause = false; | 517 | headphone_caused_pause = false; |
518 | } else { | 518 | } else { |
519 | if ((audio_stat & AUDIO_STATUS_PLAY) && | 519 | if ((audio_stat & AUDIO_STATUS_PLAY) && |
520 | !(audio_stat & AUDIO_STATUS_PAUSE)) | 520 | !(audio_stat & AUDIO_STATUS_PAUSE)) |
521 | { | 521 | { |
522 | headphone_caused_pause = true; | 522 | headphone_caused_pause = true; |
523 | pause_action(false, false); | 523 | pause_action(false); |
524 | } | 524 | } |
525 | } | 525 | } |
526 | } | 526 | } |
@@ -552,14 +552,14 @@ static void lo_unplug_change(bool inserted) | |||
552 | if ((audio_stat & AUDIO_STATUS_PLAY) && | 552 | if ((audio_stat & AUDIO_STATUS_PLAY) && |
553 | lineout_caused_pause && | 553 | lineout_caused_pause && |
554 | global_settings.unplug_mode > 1 ) | 554 | global_settings.unplug_mode > 1 ) |
555 | unpause_action(true, true); | 555 | unpause_action(true); |
556 | lineout_caused_pause = false; | 556 | lineout_caused_pause = false; |
557 | } else { | 557 | } else { |
558 | if ((audio_stat & AUDIO_STATUS_PLAY) && | 558 | if ((audio_stat & AUDIO_STATUS_PLAY) && |
559 | !(audio_stat & AUDIO_STATUS_PAUSE)) | 559 | !(audio_stat & AUDIO_STATUS_PAUSE)) |
560 | { | 560 | { |
561 | lineout_caused_pause = true; | 561 | lineout_caused_pause = true; |
562 | pause_action(false, false); | 562 | pause_action(false); |
563 | } | 563 | } |
564 | } | 564 | } |
565 | } | 565 | } |
@@ -629,7 +629,7 @@ long default_event_handler_ex(long event, void (*callback)(void *), void *parame | |||
629 | return SYS_CHARGER_DISCONNECTED; | 629 | return SYS_CHARGER_DISCONNECTED; |
630 | 630 | ||
631 | case SYS_CAR_ADAPTER_RESUME: | 631 | case SYS_CAR_ADAPTER_RESUME: |
632 | unpause_action(true, true); | 632 | unpause_action(true); |
633 | return SYS_CAR_ADAPTER_RESUME; | 633 | return SYS_CAR_ADAPTER_RESUME; |
634 | #endif | 634 | #endif |
635 | #ifdef HAVE_HOTSWAP_STORAGE_AS_MAIN | 635 | #ifdef HAVE_HOTSWAP_STORAGE_AS_MAIN |
@@ -710,9 +710,9 @@ long default_event_handler_ex(long event, void (*callback)(void *), void *parame | |||
710 | if (status & AUDIO_STATUS_PLAY) | 710 | if (status & AUDIO_STATUS_PLAY) |
711 | { | 711 | { |
712 | if (status & AUDIO_STATUS_PAUSE) | 712 | if (status & AUDIO_STATUS_PAUSE) |
713 | unpause_action(true, true); | 713 | unpause_action(true); |
714 | else | 714 | else |
715 | pause_action(true, true); | 715 | pause_action(true); |
716 | } | 716 | } |
717 | else | 717 | else |
718 | if (playlist_resume() != -1) | 718 | if (playlist_resume() != -1) |