1
0
Fork 0
forked from len0rd/rockbox

Stop/shutdown logic rework in browsers and menus. Recorder V1: Double-Off shutdown is now possible from menus and sub-browsers as well. Player, other targets which are always powered during charging: Attempted shutdown from menu with charger plugged now displays the charging splash.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@13079 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Jens Arnold 2007-04-09 13:39:37 +00:00
parent dcb4aa242b
commit 178c565beb
6 changed files with 59 additions and 46 deletions

View file

@ -25,11 +25,13 @@
#include "root_menu.h"
#include "lang.h"
#include "settings.h"
#include "screens.h"
#include "kernel.h"
#include "debug.h"
#include "misc.h"
#include "rolo.h"
#include "powermgmt.h"
#include "power.h"
#if LCD_DEPTH > 1
#include "backdrop.h"
@ -304,7 +306,10 @@ MENUITEM_RETURNVALUE(bookmarks, ID2P(LANG_BOOKMARK_MENU_RECENT_BOOKMARKS),
#ifdef HAVE_LCD_CHARCELLS
static int do_shutdown(void)
{
sys_poweroff();
if (charger_inserted())
charging_splash();
else
sys_poweroff();
return 0;
}
MENUITEM_FUNCTION(do_shutdown_item, 0, ID2P(LANG_SHUTDOWN),