diff options
Diffstat (limited to 'apps/misc.c')
-rw-r--r-- | apps/misc.c | 17 |
1 files changed, 7 insertions, 10 deletions
diff --git a/apps/misc.c b/apps/misc.c index 12d0c8d95a..d72d7a4da0 100644 --- a/apps/misc.c +++ b/apps/misc.c | |||
@@ -454,10 +454,7 @@ static void car_adapter_mode_processing(bool inserted) | |||
454 | if ((audio_status() & AUDIO_STATUS_PLAY) && | 454 | if ((audio_status() & AUDIO_STATUS_PLAY) && |
455 | !(audio_status() & AUDIO_STATUS_PAUSE)) | 455 | !(audio_status() & AUDIO_STATUS_PAUSE)) |
456 | { | 456 | { |
457 | if (global_settings.fade_on_stop) | 457 | pause_action(true, true); |
458 | fade(false, false); | ||
459 | else | ||
460 | audio_pause(); | ||
461 | } | 458 | } |
462 | waiting_to_resume_play = false; | 459 | waiting_to_resume_play = false; |
463 | } | 460 | } |
@@ -495,18 +492,18 @@ static void unplug_change(bool inserted) | |||
495 | int audio_stat = audio_status(); | 492 | int audio_stat = audio_status(); |
496 | if (inserted) | 493 | if (inserted) |
497 | { | 494 | { |
495 | backlight_on(); | ||
498 | if ((audio_stat & AUDIO_STATUS_PLAY) && | 496 | if ((audio_stat & AUDIO_STATUS_PLAY) && |
499 | headphone_caused_pause && | 497 | headphone_caused_pause && |
500 | global_settings.unplug_mode > 1 ) | 498 | global_settings.unplug_mode > 1 ) |
501 | audio_resume(); | 499 | unpause_action(true, true); |
502 | backlight_on(); | ||
503 | headphone_caused_pause = false; | 500 | headphone_caused_pause = false; |
504 | } else { | 501 | } else { |
505 | if ((audio_stat & AUDIO_STATUS_PLAY) && | 502 | if ((audio_stat & AUDIO_STATUS_PLAY) && |
506 | !(audio_stat & AUDIO_STATUS_PAUSE)) | 503 | !(audio_stat & AUDIO_STATUS_PAUSE)) |
507 | { | 504 | { |
508 | headphone_caused_pause = true; | 505 | headphone_caused_pause = true; |
509 | audio_pause(); | 506 | pause_action(false, false); |
510 | 507 | ||
511 | if (global_settings.unplug_rw) | 508 | if (global_settings.unplug_rw) |
512 | { | 509 | { |
@@ -584,7 +581,7 @@ long default_event_handler_ex(long event, void (*callback)(void *), void *parame | |||
584 | return SYS_CHARGER_DISCONNECTED; | 581 | return SYS_CHARGER_DISCONNECTED; |
585 | 582 | ||
586 | case SYS_CAR_ADAPTER_RESUME: | 583 | case SYS_CAR_ADAPTER_RESUME: |
587 | audio_resume(); | 584 | unpause_action(true, true); |
588 | return SYS_CAR_ADAPTER_RESUME; | 585 | return SYS_CAR_ADAPTER_RESUME; |
589 | #endif | 586 | #endif |
590 | #ifdef HAVE_HOTSWAP_STORAGE_AS_MAIN | 587 | #ifdef HAVE_HOTSWAP_STORAGE_AS_MAIN |
@@ -661,9 +658,9 @@ long default_event_handler_ex(long event, void (*callback)(void *), void *parame | |||
661 | if (status & AUDIO_STATUS_PLAY) | 658 | if (status & AUDIO_STATUS_PLAY) |
662 | { | 659 | { |
663 | if (status & AUDIO_STATUS_PAUSE) | 660 | if (status & AUDIO_STATUS_PAUSE) |
664 | audio_resume(); | 661 | unpause_action(true, true); |
665 | else | 662 | else |
666 | audio_pause(); | 663 | pause_action(true, true); |
667 | } | 664 | } |
668 | else | 665 | else |
669 | if (playlist_resume() != -1) | 666 | if (playlist_resume() != -1) |