diff options
| author | Linus Nielsen Feltzing <linus@haxx.se> | 2004-10-12 11:00:19 +0000 |
|---|---|---|
| committer | Linus Nielsen Feltzing <linus@haxx.se> | 2004-10-12 11:00:19 +0000 |
| commit | 0b3ea1bfcba0e56e72cacfcb88944dcf2e3b3a07 (patch) | |
| tree | 70627c231bc98f806bfd0fb7e7b1af58432df819 /apps/misc.c | |
| parent | 2e9412025b2f84b86a855c05beb748bc2e585525 (diff) | |
| download | rockbox-0b3ea1bfcba0e56e72cacfcb88944dcf2e3b3a07.zip rockbox-0b3ea1bfcba0e56e72cacfcb88944dcf2e3b3a07.tar.gz rockbox-0b3ea1bfcba0e56e72cacfcb88944dcf2e3b3a07.tar.bz2 rockbox-0b3ea1bfcba0e56e72cacfcb88944dcf2e3b3a07.tar.xz | |
Now the FM, V2 and Ondio players use the new SYS_POWEROFF event. Now you can safely turn off the player by holding OFF.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@5259 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/misc.c')
| -rw-r--r-- | apps/misc.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/apps/misc.c b/apps/misc.c index 96d23a8..5be6264 100644 --- a/apps/misc.c +++ b/apps/misc.c @@ -217,6 +217,7 @@ bool clean_shutdown(void) { lcd_clear_display(); splash(0, true, str(LANG_SHUTTINGDOWN)); + sleep(HZ); mpeg_stop(); ata_flush(); ata_spindown(1); @@ -239,6 +240,10 @@ int default_event_handler(int event) #endif usb_screen(); return SYS_USB_CONNECTED; + case SYS_POWEROFF: + if (!clean_shutdown()) + return SYS_POWEROFF; + break; } return 0; } |