From faf157f208dde15fb2258e6e5c48ddfb904f9325 Mon Sep 17 00:00:00 2001 From: Björn Stenberg Date: Sun, 26 May 2002 17:11:02 +0000 Subject: Added sound menu, adapted to new menu API git-svn-id: svn://svn.rockbox.org/rockbox/trunk@709 a1c6a512-1295-4272-9138-f99709370657 --- apps/main_menu.c | 53 ++++++++++++++++++++++------------------------------- 1 file changed, 22 insertions(+), 31 deletions(-) (limited to 'apps/main_menu.c') diff --git a/apps/main_menu.c b/apps/main_menu.c index f4c09828d0..2c23c3185b 100644 --- a/apps/main_menu.c +++ b/apps/main_menu.c @@ -23,42 +23,16 @@ #include "lcd.h" #include "button.h" #include "kernel.h" - -void show_splash(void); +#include "main_menu.h" +#include "sound_menu.h" #ifdef HAVE_LCD_BITMAP - #include "screensaver.h" extern void tetris(void); - -/* recorder menu */ -enum Main_Menu_Ids { - Tetris, Screen_Saver, Splash, Credits -}; - -struct menu_items items[] = { - { Tetris, "Tetris", tetris }, - { Screen_Saver, "Screen Saver", screensaver }, - { Splash, "Splash", show_splash }, - { Credits, "Credits", show_credits }, -}; - -#else - -/* player menu */ -enum Main_Menu_Ids { - Splash, Credits -}; - -struct menu_items items[] = { - { Splash, "Splash", show_splash }, - { Credits, "Credits", show_credits }, -}; - #endif #ifdef HAVE_LCD_BITMAP -int show_logo(void) +static int show_logo(void) { unsigned char buffer[112 * 8]; @@ -132,6 +106,23 @@ void show_splash(void) void main_menu(void) { - menu_init( items, sizeof(items)/sizeof(struct menu_items) ); - menu_run(); + int m; + enum { + Tetris, Screen_Saver, Splash, Credits, Sound + }; + + /* main menu */ + struct menu_items items[] = { + { Sound, "Sound", sound_menu }, +#ifdef HAVE_LCD_BITMAP + { Tetris, "Tetris", tetris }, + { Screen_Saver, "Screen Saver", screensaver }, +#endif + { Splash, "Splash", show_splash }, + { Credits, "Credits", show_credits } + }; + + m=menu_init( items, sizeof items / sizeof(struct menu_items) ); + menu_run(m); + menu_exit(m); } -- cgit v1.2.3