summaryrefslogtreecommitdiff
path: root/apps/main_menu.c
diff options
context:
space:
mode:
authorLinus Nielsen Feltzing <linus@haxx.se>2005-07-05 00:03:18 +0000
committerLinus Nielsen Feltzing <linus@haxx.se>2005-07-05 00:03:18 +0000
commit6e80ac39a5a3e7091c14db19cac791c9ddb8849f (patch)
treee719274318b79d5fc5e5df8a01ad1b32a9be7745 /apps/main_menu.c
parent839dbcaed7ea135dcc0812de76f9ff5c1dc924f5 (diff)
downloadrockbox-6e80ac39a5a3e7091c14db19cac791c9ddb8849f.tar.gz
rockbox-6e80ac39a5a3e7091c14db19cac791c9ddb8849f.zip
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
Diffstat (limited to 'apps/main_menu.c')
-rw-r--r--apps/main_menu.c9
1 files changed, 8 insertions, 1 deletions
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)
361 return result; 361 return result;
362} 362}
363 363
364#ifdef HAVE_LCD_CHARCELLS
365static void do_shutdown(void)
366{
367 sys_poweroff(false);
368}
369#endif
370
364bool main_menu(void) 371bool main_menu(void)
365{ 372{
366 int m; 373 int m;
@@ -405,7 +412,7 @@ bool main_menu(void)
405 412
406#ifdef HAVE_LCD_CHARCELLS 413#ifdef HAVE_LCD_CHARCELLS
407 items[i].desc = ID2P(LANG_SHUTDOWN); 414 items[i].desc = ID2P(LANG_SHUTDOWN);
408 items[i++].function = clean_shutdown; 415 items[i++].function = do_shutdown;
409#endif 416#endif
410 417
411 m=menu_init( items, i, NULL, NULL, NULL, NULL ); 418 m=menu_init( items, i, NULL, NULL, NULL, NULL );