diff options
Diffstat (limited to 'apps/main_menu.c')
-rw-r--r-- | apps/main_menu.c | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/apps/main_menu.c b/apps/main_menu.c index 2cb9bda9bd..885deea6c4 100644 --- a/apps/main_menu.c +++ b/apps/main_menu.c | |||
@@ -105,7 +105,7 @@ int show_logo( void ) | |||
105 | return 0; | 105 | return 0; |
106 | } | 106 | } |
107 | 107 | ||
108 | void show_credits(void) | 108 | Menu show_credits(void) |
109 | { | 109 | { |
110 | int j = 0; | 110 | int j = 0; |
111 | int btn; | 111 | int btn; |
@@ -120,22 +120,23 @@ void show_credits(void) | |||
120 | 120 | ||
121 | btn = button_get(false); | 121 | btn = button_get(false); |
122 | if (btn != BUTTON_NONE && !(btn & BUTTON_REL)) | 122 | if (btn != BUTTON_NONE && !(btn & BUTTON_REL)) |
123 | return; | 123 | return MENU_OK; |
124 | } | 124 | } |
125 | roll_credits(); | 125 | roll_credits(); |
126 | return MENU_OK; | ||
126 | } | 127 | } |
127 | 128 | ||
128 | #ifdef SIMULATOR | 129 | #ifdef SIMULATOR |
129 | #define mp3buf 0 | 130 | #define mp3buf 0 |
130 | #define mp3end 0 | 131 | #define mp3end 0 |
131 | 132 | ||
132 | extern void simulate_usb(void); | 133 | extern Menu simulate_usb(void); |
133 | #else | 134 | #else |
134 | /* defined in linker script */ | 135 | /* defined in linker script */ |
135 | extern unsigned char mp3buf[]; | 136 | extern unsigned char mp3buf[]; |
136 | extern unsigned char mp3end[]; | 137 | extern unsigned char mp3end[]; |
137 | #endif | 138 | #endif |
138 | void show_info(void) | 139 | Menu show_info(void) |
139 | { | 140 | { |
140 | char s[32]; | 141 | char s[32]; |
141 | int buflen = ((mp3end - mp3buf) * 100) / 0x100000; | 142 | int buflen = ((mp3end - mp3buf) * 100) / 0x100000; |
@@ -181,11 +182,14 @@ void show_info(void) | |||
181 | if(button_get(false) & ~BUTTON_REL) | 182 | if(button_get(false) & ~BUTTON_REL) |
182 | done = true; | 183 | done = true; |
183 | } | 184 | } |
185 | |||
186 | return MENU_OK; | ||
184 | } | 187 | } |
185 | 188 | ||
186 | void main_menu(void) | 189 | Menu main_menu(void) |
187 | { | 190 | { |
188 | int m; | 191 | int m; |
192 | Menu result; | ||
189 | 193 | ||
190 | /* main menu */ | 194 | /* main menu */ |
191 | struct menu_items items[] = { | 195 | struct menu_items items[] = { |
@@ -208,11 +212,13 @@ void main_menu(void) | |||
208 | #ifdef HAVE_LCD_CHARCELLS | 212 | #ifdef HAVE_LCD_CHARCELLS |
209 | lcd_icon(ICON_PARAM, true); | 213 | lcd_icon(ICON_PARAM, true); |
210 | #endif | 214 | #endif |
211 | menu_run(m); | 215 | result = menu_run(m); |
212 | #ifdef HAVE_LCD_CHARCELLS | 216 | #ifdef HAVE_LCD_CHARCELLS |
213 | lcd_icon(ICON_PARAM, false); | 217 | lcd_icon(ICON_PARAM, false); |
214 | #endif | 218 | #endif |
215 | menu_exit(m); | 219 | menu_exit(m); |
216 | 220 | ||
217 | settings_save(); | 221 | settings_save(); |
222 | |||
223 | return result; | ||
218 | } | 224 | } |