From 6e80ac39a5a3e7091c14db19cac791c9ddb8849f Mon Sep 17 00:00:00 2001 From: Linus Nielsen Feltzing Date: Tue, 5 Jul 2005 00:03:18 +0000 Subject: New poweroff handling, using the SYS_POWEROFF event, allowing plugins to save their settings before powering off. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@7019 a1c6a512-1295-4272-9138-f99709370657 --- apps/main_menu.c | 9 ++++++++- apps/screens.c | 2 +- 2 files changed, 9 insertions(+), 2 deletions(-) (limited to 'apps') diff --git a/apps/main_menu.c b/apps/main_menu.c index 68d6699cd5..87518cff28 100644 --- a/apps/main_menu.c +++ b/apps/main_menu.c @@ -361,6 +361,13 @@ bool info_menu(void) return result; } +#ifdef HAVE_LCD_CHARCELLS +static void do_shutdown(void) +{ + sys_poweroff(false); +} +#endif + bool main_menu(void) { int m; @@ -405,7 +412,7 @@ bool main_menu(void) #ifdef HAVE_LCD_CHARCELLS items[i].desc = ID2P(LANG_SHUTDOWN); - items[i++].function = clean_shutdown; + items[i++].function = do_shutdown; #endif m=menu_init( items, i, NULL, NULL, NULL, NULL ); diff --git a/apps/screens.c b/apps/screens.c index e188d341d8..6d9b299c54 100644 --- a/apps/screens.c +++ b/apps/screens.c @@ -1253,7 +1253,7 @@ bool shutdown_screen(void) switch(button) { case BUTTON_OFF: - clean_shutdown(); + sys_poweroff(false); break; default: -- cgit v1.2.3