summaryrefslogtreecommitdiff
path: root/firmware/powermgmt.c
diff options
context:
space:
mode:
Diffstat (limited to 'firmware/powermgmt.c')
-rw-r--r--firmware/powermgmt.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/firmware/powermgmt.c b/firmware/powermgmt.c
index e061f7043b..a60a35c8cb 100644
--- a/firmware/powermgmt.c
+++ b/firmware/powermgmt.c
@@ -46,6 +46,9 @@
46#elif HAVE_TLV320 46#elif HAVE_TLV320
47#include "tlv320.h" 47#include "tlv320.h"
48#endif 48#endif
49#ifdef HAVE_LCD_BITMAP
50#include "font.h"
51#endif
49#include "logf.h" 52#include "logf.h"
50#include "lcd-remote.h" 53#include "lcd-remote.h"
51 54
@@ -378,7 +381,7 @@ static void handle_auto_poweroff(void)
378 * Inhibit shutdown as long as the charger is plugged in. If it is 381 * Inhibit shutdown as long as the charger is plugged in. If it is
379 * unplugged, wait for a timeout period and then shut down. 382 * unplugged, wait for a timeout period and then shut down.
380 */ 383 */
381 if(charger_input_state == CHARGER) { 384 if(charger_input_state == CHARGER || audio_stat == AUDIO_STATUS_PLAY) {
382 last_event_tick = current_tick; 385 last_event_tick = current_tick;
383 } 386 }
384#endif 387#endif
@@ -899,6 +902,9 @@ void shutdown_hw(void)
899 } 902 }
900#endif 903#endif
901 audio_stop(); 904 audio_stop();
905#ifdef HAVE_LCD_BITMAP
906 glyph_cache_save();
907#endif
902 ata_flush(); 908 ata_flush();
903 ata_spindown(1); 909 ata_spindown(1);
904 while(ata_disk_is_active()) 910 while(ata_disk_is_active())