summaryrefslogtreecommitdiff
path: root/apps/main_menu.c
diff options
context:
space:
mode:
Diffstat (limited to 'apps/main_menu.c')
-rw-r--r--apps/main_menu.c53
1 files changed, 22 insertions, 31 deletions
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 @@
23#include "lcd.h" 23#include "lcd.h"
24#include "button.h" 24#include "button.h"
25#include "kernel.h" 25#include "kernel.h"
26 26#include "main_menu.h"
27void show_splash(void); 27#include "sound_menu.h"
28 28
29#ifdef HAVE_LCD_BITMAP 29#ifdef HAVE_LCD_BITMAP
30
31#include "screensaver.h" 30#include "screensaver.h"
32extern void tetris(void); 31extern void tetris(void);
33
34/* recorder menu */
35enum Main_Menu_Ids {
36 Tetris, Screen_Saver, Splash, Credits
37};
38
39struct menu_items items[] = {
40 { Tetris, "Tetris", tetris },
41 { Screen_Saver, "Screen Saver", screensaver },
42 { Splash, "Splash", show_splash },
43 { Credits, "Credits", show_credits },
44};
45
46#else
47
48/* player menu */
49enum Main_Menu_Ids {
50 Splash, Credits
51};
52
53struct menu_items items[] = {
54 { Splash, "Splash", show_splash },
55 { Credits, "Credits", show_credits },
56};
57
58#endif 32#endif
59 33
60#ifdef HAVE_LCD_BITMAP 34#ifdef HAVE_LCD_BITMAP
61int show_logo(void) 35static int show_logo(void)
62{ 36{
63 unsigned char buffer[112 * 8]; 37 unsigned char buffer[112 * 8];
64 38
@@ -132,6 +106,23 @@ void show_splash(void)
132 106
133void main_menu(void) 107void main_menu(void)
134{ 108{
135 menu_init( items, sizeof(items)/sizeof(struct menu_items) ); 109 int m;
136 menu_run(); 110 enum {
111 Tetris, Screen_Saver, Splash, Credits, Sound
112 };
113
114 /* main menu */
115 struct menu_items items[] = {
116 { Sound, "Sound", sound_menu },
117#ifdef HAVE_LCD_BITMAP
118 { Tetris, "Tetris", tetris },
119 { Screen_Saver, "Screen Saver", screensaver },
120#endif
121 { Splash, "Splash", show_splash },
122 { Credits, "Credits", show_credits }
123 };
124
125 m=menu_init( items, sizeof items / sizeof(struct menu_items) );
126 menu_run(m);
127 menu_exit(m);
137} 128}